AIX fixes
authorJens Axboe <axboe@kernel.dk>
Tue, 4 Oct 2011 22:16:11 +0000 (00:16 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Oct 2011 22:16:11 +0000 (00:16 +0200)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
client.c
os/os-aix.h
server.c

index 8d066c5302925622ab64e104506b2a6f2edec41a..97bfc898f9a54afb3468503e683f4fffc7447b2e 100644 (file)
--- a/client.c
+++ b/client.c
@@ -8,7 +8,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
-#include <sys/mman.h>
+#include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
index ccf3bb2ca280a15bc97078d8a1662e1dd3784066..d21e57320a2edf8a6fbf709839476713aaed1afe 100644 (file)
 #define OS_MAP_ANON            MAP_ANON
 #define OS_MSG_DONTWAIT                0
 
-#warning "Assuming big endian on AIX, fix me up"
+#if BYTE_ORDER == BIG_ENDIAN
 #define FIO_BIG_ENDIAN
+#else
+#define FIO_LITTLE_ENDIAN
+#endif
+
 #define FIO_USE_GENERIC_SWAP
 
+#define FIO_OS_HAVE_SOCKLEN_T
+#define fio_socklen_t socklen_t
+
 static inline int blockdev_invalidate_cache(struct fio_file *f)
 {
        return EINVAL;
index 07f3216b4a53552f0dc2a1ec85edd10dcdb8aec5..29e2387326cfd0cf644ac639192018f876164dc2 100644 (file)
--- a/server.c
+++ b/server.c
@@ -8,7 +8,7 @@
 #include <sys/poll.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <sys/mman.h>
+#include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>