]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix unix module
authorAndrew Morton <akpm@osdl.org>
Sun, 18 Apr 2004 03:54:27 +0000 (20:54 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 18 Apr 2004 03:54:27 +0000 (20:54 -0700)
From: Rusty Russell <rusty@rustcorp.com.au>

# lsmod
Module                  Size  Used by
1                      26060  6
#

The compiler #define's unix to 1: we use -DKBUILD_MODNAME=unix.  We used to
#undef unix at the top of af_unix.c, but now the name is inserted by
modpost, that doesn't help.

#undef unix in modpost.c's generated C file.

net/unix/af_unix.c
scripts/modpost.c

index 146a454032d89962b5d4a11afd17704887e09b71..89fb7eb9e0868c3a00ca94275dbaf1710e817b30 100644 (file)
@@ -82,8 +82,6 @@
  *               with BSD names.
  */
 
-#undef unix    /* KBUILD_MODNAME */
-
 #include <linux/module.h>
 #include <linux/config.h>
 #include <linux/kernel.h>
index 523e302cf89e188a8f6c291695481928cbf6ef1d..91ace9b7719c8d38c15c1a3ad82a3715fa0d9795 100644 (file)
@@ -487,6 +487,7 @@ add_header(struct buffer *b)
        buf_printf(b, "\n");
        buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
        buf_printf(b, "\n");
+       buf_printf(b, "#undef unix\n"); /* We have a module called "unix" */
        buf_printf(b, "struct module __this_module\n");
        buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
        buf_printf(b, " .name = __stringify(KBUILD_MODNAME),\n");