From 879873dd0966569066656a7193c0d44e34c1b2e5 Mon Sep 17 00:00:00 2001 From: sbbs <> Date: Fri, 4 Nov 2011 05:58:00 +0000 Subject: [PATCH] =?UTF-8?q?Resolve=20warnings:=20sbbscon.c:=20In=20functio?= =?UTF-8?q?n=20=E2=80=98whoami=E2=80=99:=20sbbscon.c:430:=20warning:=20imp?= =?UTF-8?q?licit=20declaration=20of=20function=20=E2=80=98getresuid?= =?UTF-8?q?=E2=80=99=20sbbscon.c:432:=20warning:=20implicit=20declaration?= =?UTF-8?q?=20of=20function=20=E2=80=98getresgid=E2=80=99=20sbbscon.c:=20I?= =?UTF-8?q?n=20function=20=E2=80=98linux=5Fkeepcaps=E2=80=99:=20sbbscon.c:?= =?UTF-8?q?452:=20warning:=20implicit=20declaration=20of=20function=20?= =?UTF-8?q?=E2=80=98prctl=E2=80=99=20sbbscon.c:447:=20warning:=20unused=20?= =?UTF-8?q?variable=20=E2=80=98strbuf=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sbbs3/sbbscon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/sbbscon.c b/src/sbbs3/sbbscon.c index 856df54150..222979e0ad 100644 --- a/src/sbbs3/sbbscon.c +++ b/src/sbbs3/sbbscon.c @@ -35,6 +35,10 @@ * Note: If this box doesn't appear square, then you need to fix your tabs. * ****************************************************************************/ +#ifdef USE_LINUX_CAPS +#define _GNU_SOURCE +#endif + /* ANSI headers */ #include <stdio.h> #include <string.h> @@ -60,6 +64,7 @@ #ifdef USE_LINUX_CAPS #include <sys/capability.h> +#include <sys/prctl.h> #endif #include <sys/types.h> @@ -444,7 +449,6 @@ void list_caps(void) static int linux_keepcaps(void) { - char strbuf[100]; /* * Ask the kernel to allow us to keep our capabilities after we * setuid(). -- GitLab