[Libguestfs] [PATCH] daemon/Win32: use gnulib modules connect, socket and symlinkat (for readlinkat).
Richard W.M. Jones
rjones at redhat.com
Thu Nov 26 12:07:38 UTC 2009
We should try to replace readlinkat with {a,x}readlinkat, but I'll
leave that to a future change.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
-------------- next part --------------
>From 97b25cc5a5a30ad9fabb3a705d808051c813f2b8 Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones at redhat.com>
Date: Thu, 26 Nov 2009 11:52:28 +0000
Subject: [PATCH] daemon/Win32: use gnulib modules connect, socket and symlinkat (for readlinkat).
---
daemon/.gitignore | 1 +
daemon/Makefile.am | 9 ++++++++-
daemon/guestfsd.c | 2 ++
daemon/m4/gnulib-cache.m4 | 5 ++++-
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/daemon/.gitignore b/daemon/.gitignore
index 0d9dac7..df14433 100644
--- a/daemon/.gitignore
+++ b/daemon/.gitignore
@@ -123,6 +123,7 @@ m4/string_h.m4
m4/strndup.m4
m4/strnlen.m4
m4/symlink.m4
+m4/symlinkat.m4
m4/sys_ioctl_h.m4
m4/sys_select_h.m4
m4/sys_socket_h.m4
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 2f43448..04d50eb 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -131,7 +131,14 @@ guestfsd_SOURCES = \
zerofree.c
guestfsd_LDADD = \
libprotocol.a \
- lib/libgnu.a $(LIB_CLOCK_GETTIME)
+ lib/libgnu.a \
+ $(GETADDRINFO_LIB) \
+ $(HOSTENT_LIB) \
+ $(INET_NTOP_LIB) \
+ $(LIBSOCKET) \
+ $(LIB_CLOCK_GETTIME) \
+ $(LIBINTL) \
+ $(SERVENT_LIB)
AM_CPPFLAGS = -I$(srcdir)/lib -Ilib
guestfsd_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index acb44f9..10a3742 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -39,6 +39,8 @@
#include <netdb.h>
#include <sys/select.h>
#include <sys/wait.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
#ifdef HAVE_PRINTF_H
# include <printf.h>
diff --git a/daemon/m4/gnulib-cache.m4 b/daemon/m4/gnulib-cache.m4
index e8b9edf..1e0fd17 100644
--- a/daemon/m4/gnulib-cache.m4
+++ b/daemon/m4/gnulib-cache.m4
@@ -15,13 +15,14 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=gl byteswap c-ctype fsusage futimens getaddrinfo getline glob hash ignore-value manywarnings mkdtemp netdb openat perror pread readlink select sleep strchrnul strndup sys_select sys_wait vasprintf warnings
+# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=gl byteswap c-ctype connect fsusage futimens getaddrinfo getline glob hash ignore-value manywarnings mkdtemp netdb openat perror pread readlink select sleep socket strchrnul strndup symlinkat sys_select sys_wait vasprintf warnings
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
gl_MODULES([
byteswap
c-ctype
+ connect
fsusage
futimens
getaddrinfo
@@ -38,8 +39,10 @@ gl_MODULES([
readlink
select
sleep
+ socket
strchrnul
strndup
+ symlinkat
sys_select
sys_wait
vasprintf
--
1.6.5.2
More information about the Libguestfs
mailing list