summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4e7e515)
raw | patch | inline | side by side (parent: 4e7e515)
author | Jan Andres <jandres@gmx.net> | |
Sat, 31 Jan 2015 08:43:30 +0000 (09:43 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 19 May 2015 15:43:16 +0000 (17:43 +0200) |
Work around a #error in <sys/procfs.h> that occurs when building a
32-bit binary with _FILE_OFFSET_BITS=64. This uses a hack similar
to the one in swap.c.
32-bit binary with _FILE_OFFSET_BITS=64. This uses a hack similar
to the one in swap.c.
src/processes.c | patch | blob | history |
diff --git a/src/processes.c b/src/processes.c
index 8dd43e89410823c11e329e3de6e61339de8ef16a..71295fe35fcab2668a6cd433024b5d8be78d3e4f 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
/* #endif HAVE_PROCINFO_H */
#elif KERNEL_SOLARIS
+/* Hack: Avoid #error when building a 32-bit binary with
+ * _FILE_OFFSET_BITS=64. There is a reason for this #error, as one
+ * of the structures in <sys/procfs.h> uses an off_t, but that
+ * isn't relevant to our usage of procfs. */
+#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
+# define SAVE_FOB_64
+# undef _FILE_OFFSET_BITS
+#endif
+
# include <procfs.h>
+
+#ifdef SAVE_FOB_64
+# define _FILE_OFFSET_BITS 64
+# undef SAVE_FOB_64
+#endif
+
# include <dirent.h>
/* #endif KERNEL_SOLARIS */