Re: Unix-domain sockets - abstract addresses

Keith Owens (kaos@ocs.com.au)
Mon, 12 Aug 2002 13:57:24 +1000


On Sun, 11 Aug 2002 20:13:14 -0700 (PDT),
"David S. Miller" <davem@redhat.com> wrote:
> From: Keith Owens <kaos@ocs.com.au>
> Date: Mon, 12 Aug 2002 13:20:09 +1000
>
> The problem here is that 'unix' is
> ...
> a symbol that is defined by gcc.
>
>I see. GCC really shouldn't be doing that as it pollutes the global
>namespace. However, I see current 3.x vintage gcc is still doing it
>under Linux so there must be a reason it is kept around.

Untested, against 2.5.31. It would be better to -Uunix globally but
one header depends on it, drivers/message/fusion/lsi/mpi_type.h.

--- 2.5.31-pristine/net/unix/Makefile.orig Sat May 25 14:50:09 2002
+++ 2.5.31-pristine/net/unix/Makefile Mon Aug 12 13:54:54 2002
@@ -8,5 +8,7 @@
unix-$(CONFIG_SYSCTL) += sysctl_net_unix.o
unix-objs := $(unix-y)

+EXTRA_CFLAGS += -Uunix # avoid gcc namespace pollution
+
include $(TOPDIR)/Rules.make

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/