summaryrefslogtreecommitdiff
path: root/nestegg/halloc/src/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'nestegg/halloc/src/macros.h')
-rw-r--r--nestegg/halloc/src/macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/nestegg/halloc/src/macros.h b/nestegg/halloc/src/macros.h
index c36b516ee..1f84bc277 100644
--- a/nestegg/halloc/src/macros.h
+++ b/nestegg/halloc/src/macros.h
@@ -20,7 +20,7 @@
/*
restore pointer to the structure by a pointer to its field
*/
-#define structof(p,t,f) ((t*)(- offsetof(t,f) + (char*)(p)))
+#define structof(p,t,f) ((t*)(- (ptrdiff_t) offsetof(t,f) + (char*)(p)))
/*
* redefine for the target compiler