[PATCH] Move sethostent()/gethostent() stubs to avoid implicit-function-declaration warnings

Jon TURNEY jon.turney at dronecode.org.uk
Tue Apr 21 05:44:43 PDT 2015


Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 xhost.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/xhost.c b/xhost.c
index a67d136..cd25366 100644
--- a/xhost.c
+++ b/xhost.c
@@ -160,6 +160,14 @@ XFamily(int af)
 }
 #endif /* NEEDSOCKETS */
 
+#if defined(__CYGWIN__) || defined(WIN32)
+void sethostent(int x)
+{}
+
+void endhostent()
+{}
+#endif
+
 int
 main(int argc, char *argv[])
 {
@@ -842,12 +850,3 @@ local_xerror(Display *dpy, XErrorEvent *rep)
     XmuPrintDefaultErrorMessage (dpy, rep, stderr);
     return 0;
 }
-
-#if defined(__CYGWIN__) || defined(WIN32)
-void sethostent(int x)
-{}
-
-void endhostent()
-{}
-#endif
-
-- 
2.3.5



More information about the xorg-devel mailing list