]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Tue, 7 Aug 2012 17:30:05 +0000 (10:30 -0700)
committerSean Hefty <sean.hefty@intel.com>
Tue, 7 Aug 2012 17:30:05 +0000 (10:30 -0700)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 02b75a6079da7b8ad3425546d5d628444de7958f..09c6bc44bc59ba7b39f0ec48d577283a79198ae9 100644 (file)
--- a/meta
+++ b/meta
@@ -1,10 +1,11 @@
 Version: 1
-Previous: 2eb302a5b1442ac8a38b71af3c60c1e703740ded
-Head: d1ef238625c2054a05c0376decf141aee16b428d
+Previous: 332b2aac9428f99cc18f81a28d439ea9a9b20a49
+Head: e431a9f38cba677851469cf8376b13629d44cde7
 Applied:
   real-close: 3409f8d6af187d25c63a5d1f8ee8bff5f14555e2
   dup2: 1df5d0ba001a0777074e6ab8ca215762b9431b53
   fstat: d1ef238625c2054a05c0376decf141aee16b428d
+  refresh-temp: e431a9f38cba677851469cf8376b13629d44cde7
 Unapplied:
   dbg: 0c269855776d3001e37da8c8afe283c20e1d6cd6
   waitall-buggy: c49c6b56c55385774065f5aa2704078e6ae0ceb8
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..91ac472
--- /dev/null
@@ -0,0 +1,47 @@
+Bottom: fdd492cdb13406bafcf14c37b554b2de76a99d5b
+Top:    a70e486d7fb3d18adace33aea325353d847f6b41
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2012-08-07 10:30:05 -0700
+
+Refresh of fstat
+
+---
+
+diff --git a/src/preload.c b/src/preload.c
+index 085e8b4..b9c32e6 100644
+--- a/src/preload.c
++++ b/src/preload.c
+@@ -84,6 +84,7 @@ struct socket_calls {
+                         void *optval, socklen_t *optlen);
+       int (*fcntl)(int socket, int cmd, ... /* arg */);
+       int (*dup2)(int oldfd, int newfd);
++      int (*fstat)(int fd, struct stat *buf);
+ };
+ static struct socket_calls real;
+@@ -259,6 +260,7 @@ static void init_preload(void)
+       real.getsockopt = dlsym(RTLD_NEXT, "getsockopt");
+       real.fcntl = dlsym(RTLD_NEXT, "fcntl");
+       real.dup2 = dlsym(RTLD_NEXT, "dup2");
++      real.fstat = dlsym(RTLD_NEXT, "fstat");
+       rs.socket = dlsym(RTLD_DEFAULT, "rsocket");
+       rs.bind = dlsym(RTLD_DEFAULT, "rbind");
+@@ -960,3 +962,17 @@ int dup2(int oldfd, int newfd)
+       atomic_inc(&oldfdi->refcnt);
+       return newfd;
+ }
++
++int fstat(int socket, struct stat *buf)
++{
++      int fd, ret;
++
++      if (fd_get(socket, &fd) == fd_rsocket) {
++              ret = real.fstat(socket, buf);
++              if (!ret)
++                      buf->st_mode |= __S_IFSOCK;
++      } else {
++              ret = real.fstat(fd, buf);
++      }
++      return ret;
++}