X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=upstream%2Fmisc%2Fextraheaders.sh;h=7550e074901f2fe64e8f8bf092a79b91b0ca5f31;hb=391bbaf9163ef7e66824a9a83c10aa35aa61a3cc;hp=17d2612420e529271b1b3a865e43af86aea9dc26;hpb=0cf8e6919a91a0f39c1d6852328b8bd1cf68160b;p=nestedvm.git diff --git a/upstream/misc/extraheaders.sh b/upstream/misc/extraheaders.sh index 17d2612..7550e07 100755 --- a/upstream/misc/extraheaders.sh +++ b/upstream/misc/extraheaders.sh @@ -1,13 +1,14 @@ + #!/bin/sh -e mkdir -p arpa netinet sys nestedvm for f in arpa/inet.h netdb.h netinet/in.h sys/socket.h; do - test -e $f || echo "#include " > $f + test -f $f || echo "#include " > $f done for f in getopt.h; do - test -e $f || echo "#include " > $f + test -f $f || echo "#include " > $f done cat <<__EOF__ > sys/ioctl.h @@ -369,6 +370,7 @@ cat <<__EOF__ > nestedvm/socket.h #define __NESTEDVM_SOCKETS_H #include +#include static unsigned short htons(int x) { return x; } static unsigned long htonl(int x) { return x; } @@ -444,6 +446,9 @@ int accept(int s, struct sockaddr *addr, socklen_t *addrlen); int shutdown(int s, int how); int connect(int s, const struct sockaddr *name, socklen_t namelen); char *inet_ntoa(struct in_addr in); +int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); +int sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); +int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); int getsockopt(int s, int level, int name, void *val, socklen_t *len); int setsockopt(int s, int level, int name, const void *val, socklen_t len);