]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of fstat
authorSean Hefty <sean.hefty@intel.com>
Tue, 7 Aug 2012 21:05:28 +0000 (14:05 -0700)
committerSean Hefty <sean.hefty@intel.com>
Tue, 7 Aug 2012 21:05:28 +0000 (14:05 -0700)
src/preload.c

index 33eb9a329f0940320a81b1cdf07c86fc93944e69..53f8543266ebe673b15807e16fcbdf9ccee8c283 100644 (file)
@@ -84,7 +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);
+       int (*fxstat64)(int ver, int fd, struct stat64 *buf);
 };
 
 static struct socket_calls real;
@@ -260,7 +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");
+       real.fxstat64 = dlsym(RTLD_NEXT, "__fxstat64");
 
        rs.socket = dlsym(RTLD_DEFAULT, "rsocket");
        rs.bind = dlsym(RTLD_DEFAULT, "rbind");
@@ -964,16 +964,16 @@ int dup2(int oldfd, int newfd)
        return newfd;
 }
 
-int fstat(int socket, struct stat *buf)
+int __fxstat64(int ver, int socket, struct stat64 *buf)
 {
        int fd, ret;
 
        if (fd_get(socket, &fd) == fd_rsocket) {
-               ret = real.fstat(socket, buf);
+               ret = real.fxstat64(ver, socket, buf);
                if (!ret)
                        buf->st_mode = (buf->st_mode & ~S_IFMT) | __S_IFSOCK;
        } else {
-               ret = real.fstat(fd, buf);
+               ret = real.fxstat64(ver, fd, buf);
        }
        return ret;
 }