Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libgo / runtime / go-nosys.c
index 36bbdd2..3ab5ea2 100644 (file)
 #include <math.h>
 #include <stdint.h>
 #include <sys/types.h>
+#include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/time.h>
+#include <time.h>
 #include <unistd.h>
 
 #ifndef HAVE_OFF64_T
@@ -28,6 +30,19 @@ typedef signed int off64_t __attribute__ ((mode (DI)));
 typedef off64_t loff_t;
 #endif
 
+#ifndef HAVE_ACCEPT4
+struct sockaddr;
+int
+accept4 (int sockfd __attribute__ ((unused)),
+        struct sockaddr *addr __attribute__ ((unused)),
+        socklen_t *addrlen __attribute__ ((unused)),
+        int flags __attribute__ ((unused)))
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
 #ifndef HAVE_EPOLL_CREATE1
 int
 epoll_create1 (int flags __attribute__ ((unused)))
@@ -171,6 +186,16 @@ openat (int dirfd __attribute__ ((unused)),
 }
 #endif
 
+#ifndef HAVE_PIPE2
+int
+pipe2 (int pipefd[2] __attribute__ ((unused)),
+       int flags __attribute__ ((unused)))
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
 #ifndef HAVE_RENAMEAT
 int
 renameat (int olddirfd __attribute__ ((unused)),
@@ -241,6 +266,19 @@ unshare (int flags __attribute__ ((unused)))
 }
 #endif
 
+#ifndef HAVE_UTIMENSAT
+struct timespec;
+int
+utimensat(int dirfd __attribute__ ((unused)),
+         const char *pathname __attribute__ ((unused)),
+         const struct timespec times[2] __attribute__ ((unused)),
+         int flags __attribute__ ((unused)))
+{
+  errno = ENOSYS;
+  return -1;
+}
+#endif
+
 /* Long double math functions.  These are needed on old i386 systems
    that don't have them in libm.  The compiler translates calls to
    these functions on float64 to call an 80-bit floating point