r65: Clean up LFS defines
authoryoe <yoe>
Sun, 23 May 2004 09:55:43 +0000 (09:55 +0000)
committeryoe <yoe>
Sun, 23 May 2004 09:55:43 +0000 (09:55 +0000)
lfs.h [new file with mode: 0644]
nbd-client.c
nbd-server.c

diff --git a/lfs.h b/lfs.h
new file mode 100644 (file)
index 0000000..8f90f81
--- /dev/null
+++ b/lfs.h
@@ -0,0 +1,10 @@
+#ifndef LFS_H
+#define LFS_H
+
+#include "config.h"
+#ifdef NBD_LFS
+#define _FILE_OFFSET_BITS 64
+#define _LARGEFILE_SOURCE
+#endif /* NBD_LFS */
+
+#endif /* LFS_H */
index ecb20fd..285e27a 100644 (file)
@@ -14,6 +14,7 @@
  */
 
 #include "config.h"
+#include "lfs.h"
 
 #include <asm/page.h>
 #include <sys/ioctl.h>
 #include <syslog.h>
 #include <stdlib.h>
 
-#define MY_NAME "nbd_client"
 #ifndef __GNUC__
 #error I need GCC to work
 #endif
 
 #include <linux/ioctl.h>
+#define MY_NAME "nbd_client"
 #include "cliserv.h"
 
 int opennet(char *name, int port)
index 0eab68c..e22223a 100644 (file)
@@ -54,6 +54,7 @@
 /* Includes LFS defines, which defines behaviours of some of the following
  * headers, so must come before those */
 #include "config.h"
+#include "lfs.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>