Merge branch 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[firefly-linux-kernel-4.4.55.git] / include / linux / a.out.h
index f913cc3e1b0da141d273522c751e4003cfc7ec18..e86dfca44589f49e083e53a3f905868ba2e89955 100644 (file)
@@ -9,6 +9,8 @@
 
 #endif /* __STRUCT_EXEC_OVERRIDE__ */
 
+#ifndef __ASSEMBLY__
+
 /* these go in the N_MACHTYPE field */
 enum machine_type {
 #if defined (M_OLDSUN2)
@@ -128,12 +130,20 @@ enum machine_type {
 #endif
 
 #ifdef linux
+#ifdef __KERNEL__
 #include <asm/page.h>
+#else
+#include <unistd.h>
+#endif
 #if defined(__i386__) || defined(__mc68000__)
 #define SEGMENT_SIZE   1024
 #else
 #ifndef SEGMENT_SIZE
+#ifdef __KERNEL__
 #define SEGMENT_SIZE   PAGE_SIZE
+#else
+#define SEGMENT_SIZE   getpagesize()
+#endif
 #endif
 #endif
 #endif
@@ -264,5 +274,5 @@ struct relocation_info
 };
 #endif /* no N_RELOCATION_INFO_DECLARED.  */
 
-
+#endif /*__ASSEMBLY__ */
 #endif /* __A_OUT_GNU_H__ */