]> Zhao Yanbai Git Server - minix.git/commitdiff
NBSD libc: fix forgot weak_alias
authorGianluca Guida <gianluca@minix3.org>
Thu, 3 Mar 2011 16:44:18 +0000 (16:44 +0000)
committerGianluca Guida <gianluca@minix3.org>
Thu, 3 Mar 2011 16:44:18 +0000 (16:44 +0000)
This patch add a few weak_alias forgotten, so that non-internal
symbols are defined to be used from application.

Modifying only the minix-specific part, this patch needs no update
to minix-port.patch.

lib/nbsd_libc/gen/minix/getdomainname.c
lib/nbsd_libc/sys-minix/bind.c
lib/nbsd_libc/sys-minix/chown.c

index 8da6942ba2e4aaed9638a721dba05d9fbef064f9..5d70f41f016b4abf25c8cee47beeb2dc50cb3b01 100644 (file)
@@ -2,10 +2,15 @@
  *                                                             2 Dec 1994
  */
 #define nil 0
+#include "namespace.h"
 #include <sys/types.h>
 #include <unistd.h>
 #include <string.h>
 
+#ifdef __weak_alias
+__weak_alias(getdomainname, _getdomainname)
+#endif
+
 int getdomainname(char *domain, size_t size)
 {
        char nodename[256];
index ef8d196fb26c4f3451467411fe6aeb8f814a17fd..b8ceb898486fd31569e0687221025d58fc4a8ede 100644 (file)
@@ -1,6 +1,10 @@
 #include <sys/cdefs.h>
 #include "namespace.h"
 
+#ifdef __weak_alias
+__weak_alias(bind, _bind)
+#endif
+
 #include <unistd.h>
 #include <stdint.h>
 #include <stdlib.h>
index d292677adca15bafe1ef4c9251b189ed945083af..3af36961c5a72f69bc100dffe9c3bc4b28a7d343 100644 (file)
@@ -5,6 +5,10 @@
 #include <string.h>
 #include <unistd.h>
 
+#ifdef __weak_alias
+__weak_alias(chown, _chown)
+#endif
+
 PUBLIC int chown(const char *name, uid_t owner, gid_t grp)
 {
   message m;