summaryrefslogtreecommitdiff
path: root/disk-utils/mkswap.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2006-12-07 00:25:46 +0100
committerKarel Zak <kzak@redhat.com>2006-12-07 00:25:46 +0100
commitc07ebfa1e02d208ab12430e6791ea147bcfaf9c0 (patch)
treed44a755098286f5d553c7aea1a73d98c2995d6ec /disk-utils/mkswap.c
parent66ee8158b69525e12060ef558cb5d77feadab1dc (diff)
downloadutil-linux-old-c07ebfa1e02d208ab12430e6791ea147bcfaf9c0.tar.gz
Imported from util-linux-2.11b tarball.
Diffstat (limited to 'disk-utils/mkswap.c')
-rw-r--r--disk-utils/mkswap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index 6bd96d90..ea2ec20d 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -26,7 +26,7 @@
* V1_MAX_PAGES fixes, jj, 990325.
* sparc64 fixes, jj, 000219.
*
- * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
+ * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
* - added Native Language Support
*
*/
@@ -41,12 +41,16 @@
#include <sys/stat.h>
#include "nls.h"
+/* Try to get PAGE_SIZE from libc or kernel includes */
+#ifdef HAVE_sys_user_h
+ /* Note: <sys/user.h> says: for gdb only */
+#include <sys/user.h> /* for PAGE_SIZE and PAGE_SHIFT */
+#else
#ifdef HAVE_asm_page_h
#include <asm/page.h> /* for PAGE_SIZE and PAGE_SHIFT */
/* we also get PAGE_SIZE via getpagesize() */
-/* recent glibc systems also define this in <sys/user.h> */
#endif
-
+#endif
#ifndef _IO
/* pre-1.3.45 */