- 论坛徽章:
- 0
|
OS RedHat 7.2\r\nkernel 2.4.7-10\r\nnbd-2.4.29\r\n\r\n\r\n#make config all\r\n........\r\ncreating Makefile\r\ncreating config.h\r\nconfig.h is unchanged\r\nmake[1]: Entering directory `/tmp\'\r\nmake[1]: Nothing to be done for `config\'.\r\nmake[1]: Leaving directory `/tmp\'\r\nmake -C /tmp VPATH=/u01/softpkg/nbd-2.4.29/nbd CFLAGS=\"-O2 -Wall -D_LARGEFILE64_SOURCE -I/tmp -I/u01/softpkg/nbd-2.4.29/linux/include -I/usr/src/linux/include -DDEBUG=0\" LIBS=\" \"\r\nmake[1]: Entering directory `/tmp\'\r\ngcc -O2 -Wall -D_LARGEFILE64_SOURCE -I/tmp -I/u01/softpkg/nbd-2.4.29/linux/include -I/usr/src/linux/include -DDEBUG=0 -o nbd-server.o -c /u01/softpkg/nbd-2.4.29/nbd/nbd-server.c\r\nIn file included from /u01/softpkg/nbd-2.4.29/nbd/nbd-server.c:47:\r\n/u01/softpkg/nbd-2.4.29/nbd/cliserv.h:28:2: #error I need at least some 8-bit unsigned type\r\n/u01/softpkg/nbd-2.4.29/nbd/cliserv.h:36:2: #error I need at least some 16-bit unsigned type\r\n/u01/softpkg/nbd-2.4.29/nbd/cliserv.h:46:2: #error I need at least some 32-bit unsigned type\r\n/u01/softpkg/nbd-2.4.29/nbd/cliserv.h:56:2: #error I need at least some 64-bit unsigned type\r\n/u01/softpkg/nbd-2.4.29/nbd/cliserv.h:66:2: #error I need at least some 64-bit signed type\r\nmake[1]: *** [nbd-server.o] Error 1\r\nmake[1]: Leaving directory `/tmp\'\r\nmake: *** [drivers] Error 2\r\n\r\n\r\n\r\n/*------------------------------------------------------------------------*/\r\nconfig.h\r\n\r\n/* config.h. Generated automatically by configure. */\r\n/* config.h.in. Generated automatically from configure.in by autoheader. */\r\n\r\n/* Define to empty if the keyword does not work. */\r\n#define const \r\n\r\n/* Define as __inline if that\'s what the C compiler calls it. */\r\n/* #undef inline */\r\n\r\n/* Define to `unsigned\' if <sys/types.h> doesn\'t define. */\r\n/* #undef size_t */\r\n\r\n/* Define if you have the socklen_t type. */\r\n/* #undef HAVE_SOCKLEN_T */\r\n\r\n/* Define if you have the ANSI C header files. */\r\n#define STDC_HEADERS 1\r\n\r\n/* Define if your processor stores words with the most significant\r\n byte first (like Motorola and SPARC, unlike Intel and VAX). */\r\n/* #undef WORDS_BIGENDIAN */\r\n\r\n/* The number of bytes in a char. */\r\n#define SIZEOF_CHAR 0\r\n\r\n/* The number of bytes in a int. */\r\n#define SIZEOF_INT 0\r\n\r\n/* The number of bytes in a long int. */\r\n#define SIZEOF_LONG_INT 0\r\n\r\n/* The number of bytes in a long long int. */\r\n#define SIZEOF_LONG_LONG_INT 0\r\n\r\n/* The number of bytes in a short int. */\r\n#define SIZEOF_SHORT_INT 0\r\n\r\n/* The number of bytes in a unsigned char. */\r\n#define SIZEOF_UNSIGNED_CHAR 0\r\n\r\n/* The number of bytes in a unsigned int. */\r\n#define SIZEOF_UNSIGNED_INT 0\r\n\r\n/* The number of bytes in a unsigned long int. */\r\n#define SIZEOF_UNSIGNED_LONG_INT 0\r\n\r\n/* The number of bytes in a unsigned long long int. */\r\n#define SIZEOF_UNSIGNED_LONG_LONG_INT 0\r\n\r\n/* The number of bytes in a unsigned short int. */\r\n#define SIZEOF_UNSIGNED_SHORT_INT 0\r\n\r\n/* Define if you have the if_nameindex function. */\r\n#define HAVE_IF_NAMEINDEX 1\r\n\r\n/* Define if you have the llseek function. */\r\n#define HAVE_LLSEEK 1\r\n\r\n/* Define if you have the lseek64 function. */\r\n#define HAVE_LSEEK64 1\r\n\r\n/* Define if you have the if_nameindex function. */\r\n#define HAVE_IF_NAMEINDEX 1\r\n\r\n/* Define if you have the bdflush function. */\r\n#define HAVE_BDFLUSH 1\r\n\r\n\r\n/* --------------------------------------------------------------------- */\r\nclserv.h\r\n\r\n\r\n/* \r\n * Copyright (C) 1999-2001 Peter T. Breuer <ptb@it.uc3m.es>\r\n */\r\n\r\n\r\n#ifndef CLISERV_H\r\n#define CLISERV_H\r\n\r\n/* This header file is shared by client & server. They really have\r\n * something to share...\r\n * */\r\n\r\n/* Client/server protocol is as follows:\r\n Send INIT_PASSWD\r\n Send 64-bit cliserv_magic\r\n Send 32-bit blocksize\r\n Send 64-bit size of exported device\r\n Send 16 bit total daemons requested\r\n*/ \r\n\r\n#include \"config.h\"\r\n\r\n#if SIZEOF_UNSIGNED_CHAR==1\r\n typedef unsigned char u8;\r\n#elif SIZEOF_UNSIGNED_SHORT_INT==1\r\n typedef unsigned short u8;\r\n#else\r\n#error I need at least some 8-bit unsigned type\r\n#endif\r\n\r\n#if SIZEOF_UNSIGNED_SHORT_INT==2\r\n typedef unsigned short u16;\r\n#elif SIZEOF_UNSIGNED_CHAR==2\r\n typedef unsigned char u16;\r\n#else\r\n#error I need at least some 16-bit unsigned type\r\n#endif\r\n\r\n#if SIZEOF_UNSIGNED_SHORT_INT==4\r\n typedef unsigned short u32;\r\n#elif SIZEOF_UNSIGNED_INT==4\r\n typedef unsigned int u32;\r\n#elif SIZEOF_UNSIGNED_LONG_INT==4\r\n typedef unsigned long u32;\r\n#else\r\n#error I need at least some 32-bit unsigned type\r\n#endif\r\n\r\n#if SIZEOF_UNSIGNED_INT==8\r\n typedef unsigned int u64;\r\n#elif SIZEOF_UNSIGNED_LONG_INT==8\r\n typedef unsigned long u64;\r\n#elif SIZEOF_UNSIGNED_LONG_LONG_INT==8\r\n typedef unsigned long long u64;\r\n#else\r\n#error I need at least some 64-bit unsigned type\r\n#endif\r\n\r\n#if SIZEOF_UNSIGNED_INT==8\r\n typedef int s64;\r\n#elif SIZEOF_UNSIGNED_LONG_INT==8\r\n typedef long s64;\r\n#elif SIZEOF_UNSIGNED_LONG_LONG_INT==8\r\n typedef long long s64;\r\n#else\r\n#error I need at least some 64-bit signed type\r\n#endif\r\n\r\n#define MAXCONN 16 /* number of slave daemons (minor devices) */\r\n#define MAXDEV 8 /* number of nbd whole devices */\r\n#define NBD_MAX_LIVES 30 /* number of internal rebirths per daemon */\r\n\r\nstatic const u64 cliserv_magic = 0x00420281861253LL;\r\n#define INIT_PASSWD \"NBDMAGIC\"\r\n\r\n#if DEBUG > 0\r\n #if DEBUG > 1\r\n #define DODBG\r\n #endif\r\n #define DEBUG_DFLT 1\r\n #undef DEBUG\r\n #define DEBUG( a... ) if(debug_level > 0) PERR(a) /**/\r\n#else\r\n #undef DEBUG\r\n #define DEBUG( a... )\r\n #define DEBUG_DFLT 0\r\n#endif\r\n\r\n#define MSG(s...) { \\\r\n syslog(LOG_DAEMON|LOG_INFO|LOG_CONS|LOG_PERROR, MY_NAME \": \" s) ; \\\r\n fflush(stderr); \\\r\n fprintf(stderr, MY_NAME \" %5d:\", getpid()); \\\r\n fprintf(stderr, \" \" s); \\\r\n fflush(stderr); \\\r\n }\r\n/* syslog logging client side too seems to be better! */\r\n#define RETRIES 3\r\n#define TRY_RESET 100\r\n#define PERR(s...) { \\\r\n static int nerrs; \\\r\n if (nerrs >= TRY_RESET) \\\r\n nerrs = 0; \\\r\n if (nerrs++ < RETRIES) { \\\r\n syslog(LOG_DAEMON|LOG_INFO|LOG_CONS|LOG_PERROR, MY_NAME \": \" __FUNCTION__ \" \" s); \\\r\n fflush(stderr); \\\r\n fprintf(stderr, MY_NAME \" %5d: \" __FUNCTION__, getpid()); \\\r\n fprintf(stderr, \" \" s); \\\r\n fflush(stderr); \\\r\n } \\\r\n }\r\n\r\n#include <netinet/in.h>\r\n\r\n#ifdef WORDS_BIGENDIAN\r\nstatic inline u64 ntohll(u64 a)\r\n{\r\n return a;\r\n}\r\n#else\r\nstatic inline u64 ntohll(u64 a)\r\n{\r\n u32 lo = a & 0xffffffff;\r\n u32 hi = a >> 32U ;\r\n lo = ntohl(lo);\r\n hi = ntohl(hi);\r\n return ((u64) lo) << 32U | hi;\r\n}\r\n#endif\r\n#define htonll ntohll\r\n\r\n#define id(n) n\r\n#define strfy(n) #n\r\n\r\n#ifndef WRITE\r\n #define WRITE 0x01\r\n#endif\r\n#ifndef READ\r\n #define READ 0x00\r\n#endif\r\n#ifndef IOCTL\r\n #define IOCTL 0x02\r\n#endif\r\n#define CKSUM 0x03\r\n\r\n#define PIDDIR \"/var/run\"\r\n#define STATDIR \"/var/state\"\r\n\r\n#endif /* CLISERV_H */\r\n\r\n\r\n我应该?????????????????????????????????\r\n |
|