Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri,  9 Mar 2012 10:14:12 +0200
From: Georgi Chorbadzhiyski <>
Subject: [PATCH 2/4] include/unistd.h: Define sethostname() if _BSD_SOURCE is set.

According to sethostname(2) man page, the function should be defined
if _BSD_SOURCE is set.
 include/unistd.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/unistd.h b/include/unistd.h
index 7662e51..3fda5aa 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -144,6 +144,10 @@ void sync(void);
 int getdtablesize(void);
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+int sethostname(const char *, size_t);
 #ifdef _GNU_SOURCE
 int brk(void *);
 void *sbrk(intptr_t);
@@ -152,7 +156,6 @@ pid_t vfork(void);
 int vhangup(void);
 int chroot(const char *);
 int getpagesize(void);
-int sethostname(const char *, size_t);
 int usleep(unsigned);
 unsigned ualarm(unsigned, unsigned);
 int setgroups(size_t, const gid_t []);

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.