aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-10-23 14:27:40 +0000
committerKenny Levinsen <kl@kl.wtf>2022-03-29 20:08:00 +0200
commit2842f0e2b1eef5b648c76a8ae0ecbf8590bc873d (patch)
treeeabed23353708a13df6a31788bd989975d4f1ca1
parent85d0bf594362bf5d85b191711e6fc2a51f6bd21a (diff)
seatd: refuse to compile with missing get_peer impl
Instead of using a stub, error out when get_peer isn't implemented for the target platform. client_create relies on it.
-rw-r--r--seatd/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/seatd/client.c b/seatd/client.c
index 0097792..a33bfe7 100644
--- a/seatd/client.c
+++ b/seatd/client.c
@@ -70,7 +70,7 @@ static int get_peer(int fd, pid_t *pid, uid_t *uid, gid_t *gid) {
*gid = cred.cr_ngroups > 0 ? cred.cr_groups[0] : (gid_t)-1;
return 0;
#else
- return -1;
+#error Unsupported platform
#endif
}