[PATCH] hostapd compile fix with gcc-3.2

Pavel Roskin proski at gnu.org
Fri Nov 15 23:08:47 EST 2002


Hello!

I'm getting a compile error while compiling hostapd:

gcc -O2 -Wall -g -I/usr/src/linux/include -DHOSTAPD_DUMP_STATE   -c -o 
hostapd.o hostapd.c
In file included from hostapd.c:34:
hostapd.h:52: unnamed fields of type other than struct or union are not 
allowed
make: *** [hostapd.o] Error 1

I'm using gcc-3.2 from Red Hat 8.0.  I think the compiler is right - enum
inside structure declaration indeed looks like an unnamed field.

This patch fixed the problem.  This patch _is_ meant to be applied to CVS.

==============================
--- hostapd/hostapd.h
+++ hostapd/hostapd.h
@@ -49,9 +49,8 @@
 	struct sta_info *sta_aid[MAX_AID_TABLE_SIZE];
 
 	enum { HOSTAPD_DEBUG_NO = 0, HOSTAPD_DEBUG_MINIMAL = 1,
-	       HOSTAPD_DEBUG_MSGDUMPS = 2 };
+	       HOSTAPD_DEBUG_MSGDUMPS = 2 } debug; /* debug verbosity level */
 
-	int debug; /* debug verbosity level */
 	char *dump_log_name; /* file name for state dump (SIGUSR1) */
 
 	int ieee802_1x; /* use IEEE 802.1X */
==============================

-- 
Regards,
Pavel Roskin




More information about the HostAP mailing list