diff --git a/aucat/sock.c b/aucat/sock.c index 2f8387a..29f861f 100644 --- a/aucat/sock.c +++ b/aucat/sock.c @@ -32,9 +32,6 @@ #ifdef DEBUG #include "dbg.h" #endif -#ifdef COMPAT_GETPEEREID -#include "bsd-compat.h" -#endif void sock_attach(struct sock *, int); int sock_read(struct sock *); diff --git a/bsd-compat/bsd-compat.h b/bsd-compat/bsd-compat.h index 1cf9a43..d2282a5 100644 --- a/bsd-compat/bsd-compat.h +++ b/bsd-compat/bsd-compat.h @@ -32,4 +32,3 @@ long long strtonum(const char *, long long, long long, const char **); size_t strlcpy(char *, const char *, size_t); int issetugid(void); -int getpeereid(int, uid_t *, gid_t *); diff --git a/bsd-compat/getpeereid.c b/bsd-compat/getpeereid.c deleted file mode 100644 index 0509fe2..0000000 --- a/bsd-compat/getpeereid.c +++ /dev/null @@ -1,18 +0,0 @@ -#ifdef COMPAT_GETPEEREID -#define _GNU_SOURCE -#include -#include - -int -getpeereid(int s, uid_t *ruid, gid_t *rgid) -{ - struct ucred cr; - socklen_t len = sizeof(cr); - - if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &cr, &len) < 0) - return -1; - *ruid = cr.uid; - *rgid = cr.gid; - return 0; -} -#endif diff --git a/configure b/configure index 1e4e0dc..8ed00a5 100755 --- a/configure +++ b/configure @@ -45,7 +45,7 @@ case `uname` in alsa=yes ldadd="-lrt" so="$so libsndio.so.\${MAJ} libsndio.so" - defs='-DCOMPAT_GETPEEREID -DCOMPAT_ISSETUGID \\\ + defs='-DCOMPAT_ISSETUGID \\\ -DCOMPAT_STRLCAT -DCOMPAT_STRLCPY -DCOMPAT_STRTONUM \\\ -DCOMPAT_LETOH -DCOMPAT_PACKED -DDEV_RANDOM=\\"/dev/urandom\\"' ;; diff --git a/libsndio/Makefile.in b/libsndio/Makefile.in index 7b5aa5c..4e2d3b5 100644 --- a/libsndio/Makefile.in +++ b/libsndio/Makefile.in @@ -99,7 +99,7 @@ clean: # OBJS = debug.o aucat.o \ mio.o mio_rmidi.o mio_aucat.o sio.o sio_alsa.o sio_aucat.o sio_sun.o \ -getpeereid.o issetugid.o strlcat.o strlcpy.o strtonum.o +issetugid.o strlcat.o strlcpy.o strtonum.o .c.o: ${CC} ${CFLAGS} ${SO_CFLAGS} ${INCLUDE} ${DEFS} -o $@ -c $< @@ -113,9 +113,6 @@ libsndio.so.${MAJ}: libsndio.so: ln -sf libsndio.so.${MAJ} libsndio.so -getpeereid.o: ../bsd-compat/getpeereid.c - ${CC} ${CFLAGS} ${SO_CFLAGS} ${INCLUDE} ${DEFS} -c -o getpeereid.o ../bsd-compat/getpeereid.c - issetugid.o: ../bsd-compat/issetugid.c ${CC} ${CFLAGS} ${SO_CFLAGS} ${INCLUDE} ${DEFS} -c -o issetugid.o ../bsd-compat/issetugid.c