From 081dabf8c6f00f30ec6a485bcd842a1f9821accc Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 14 Jul 2005 23:29:44 +0000 Subject: [PATCH] Branch b_hd_newconfig Remove the "-O2" requirement for htonl references --- lnet/include/libcfs/kp30.h | 12 ++++++++++++ lnet/klnds/socklnd/Makefile.in | 4 ---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lnet/include/libcfs/kp30.h b/lnet/include/libcfs/kp30.h index 0a7d73c..79434c3 100644 --- a/lnet/include/libcfs/kp30.h +++ b/lnet/include/libcfs/kp30.h @@ -149,6 +149,18 @@ extern struct prof_ent prof_ents[MAX_PROFS]; #define PROF_FINISH(FOO) do {} while(0) #endif /* PORTALS_PROFILING */ +/* htonl hack - either this, or compile with -O2 */ +#if defined(__GNUC__) && (__GNUC__ >= 2) +#define ___htonl(x) __cpu_to_be32(x) +#define ___htons(x) __cpu_to_be16(x) +#define ___ntohl(x) __be32_to_cpu(x) +#define ___ntohs(x) __be16_to_cpu(x) +#define htonl(x) ___htonl(x) +#define ntohl(x) ___ntohl(x) +#define htons(x) ___htons(x) +#define ntohs(x) ___ntohs(x) +#endif + /* debug.c */ extern spinlock_t stack_backtrace_lock; diff --git a/lnet/klnds/socklnd/Makefile.in b/lnet/klnds/socklnd/Makefile.in index f89ddb6..ffe306f 100644 --- a/lnet/klnds/socklnd/Makefile.in +++ b/lnet/klnds/socklnd/Makefile.in @@ -2,8 +2,4 @@ MODULES := ksocknal ksocknal-objs := socknal.o socknal_cb.o socknal_modparams.o socknal_lib-linux.o -# If you don't build with -O2, your modules won't insert, becahse htonl is -# just special that way. -EXTRA_POST_CFLAGS := -O2 - @INCLUDE_RULES@ -- 1.8.3.1