tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

diff: make librumphijack build with USE_SSP



Hi!

There's a naive diff to appease SSP to let builds happen.

Index: hijack.c
===================================================================
RCS file: /cvsroot/src/lib/librumphijack/hijack.c,v
retrieving revision 1.86
diff -u -p -r1.86 hijack.c
--- hijack.c    14 Mar 2011 15:15:47 -0000      1.86
+++ hijack.c    11 Apr 2011 21:13:10 -0000
@@ -1972,6 +1972,7 @@ FDCALL(int, shutdown, DUALCALL_SHUTDOWN,
 
 #if _FORTIFY_SOURCE > 0
 #define STUB(fun) __ssp_weak_name(fun)
+ssize_t STUB(readlink)(const char * __restrict, char * __restrict, size_t);
 ssize_t _sys_readlink(const char * __restrict, char * __restrict, size_t);
 ssize_t
 STUB(readlink)(const char * __restrict path, char * __restrict buf,
@@ -1980,6 +1981,7 @@ STUB(readlink)(const char * __restrict p
        return _sys_readlink(path, buf, bufsiz);
 }
 
+char *STUB(getcwd)(char *, size_t);
 char *_sys_getcwd(char *, size_t);
 char *
 STUB(getcwd)(char *buf, size_t size)
@@ -2130,7 +2132,7 @@ PATHCALL(int, symlink, DUALCALL_SYMLINK,
        (const char *, const char *),                                   \
        (target, path))
 
-PATHCALL(ssize_t, readlink, DUALCALL_READLINK,                         \
+PATHCALL(ssize_t, _sys_readlink, DUALCALL_READLINK,                    \
        (const char *path, char *buf, size_t bufsiz),                   \
        (const char *, char *, size_t),                                 \
        (path, buf, bufsiz))


Home | Main Index | Thread Index | Old Index