Fixing inconsistency resulted from a new version of glibc.
authorDavid Zhu <yuzhu@cs.berkeley.edu>
Mon, 2 Apr 2012 22:06:32 +0000 (15:06 -0700)
committerDavid Zhu <yuzhu@cs.berkeley.edu>
Mon, 2 Apr 2012 22:06:32 +0000 (15:06 -0700)
Basically these files were added to the old glibc directory and then
removed as a result of version change.

tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/recvfrom.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/sendto.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/socket.c [new file with mode: 0644]

diff --git a/tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/recvfrom.c b/tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/recvfrom.c
new file mode 100644 (file)
index 0000000..2e301df
--- /dev/null
@@ -0,0 +1,14 @@
+#include <sysdep.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <stddef.h>
+#include <sys/socket.h>
+#include <ros/syscall.h>
+
+int __recvfrom (int s, void *buf, size_t len, int flags,
+                 struct sockaddr *from, socklen_t *fromlen)
+{
+       return ros_syscall(SYS_recvfrom, s, buf, len, flags, from, fromlen);
+}
+
+weak_alias (__recvfrom, recvfrom)
diff --git a/tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/sendto.c b/tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/sendto.c
new file mode 100644 (file)
index 0000000..8dad065
--- /dev/null
@@ -0,0 +1,13 @@
+#include <sysdep.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <stddef.h>
+#include <sys/socket.h>
+#include <ros/syscall.h>
+
+int
+__sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) {
+       return ros_syscall(SYS_sendto, s, buf, len, flags, to, tolen);
+}
+
+weak_alias (__sendto, sendto)
diff --git a/tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/socket.c b/tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/socket.c
new file mode 100644 (file)
index 0000000..509df81
--- /dev/null
@@ -0,0 +1,15 @@
+#include <sysdep.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <stddef.h>
+#include <ros/syscall.h>
+
+int
+__socket(int socket_family, int socket_type, int protocol) {
+       int a =  ros_syscall(SYS_socket, socket_family, socket_type, protocol, 0,0,0);
+       printf("socket call result %d\n", a);
+       return a;
+}
+
+//libc_hidden_def (__socket)
+weak_alias (__socket, socket)