Skip to contentSkip to conversation

setgid03.c: Fix build.

PATCH In review Vinson Lee 2 participants 2 messages Sep 12, 2013 – Sep 13, 2013

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 setgid03.c: Fix build.

From: Vinson Lee <[email protected]>

This patch fixes build errors introduced with commit 7dc42c97696f135e1fef92e612ecc66bf8d74318.

setgid03.c:36:23: error: static declaration of ‘getpwnam’ follows non-static declaration In file included from setgid03.c:24:0:
/usr/include/pwd.h:117:23: note: previous declaration of ‘getpwnam’ was here setgid03.c:39:1: error: duplicate ‘static’
setgid03.c:40:1: error: duplicate ‘static’

---
 testcases/kernel/syscalls/setgid/setgid03.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/setgid/setgid03.c +3 -3
index 8b71401..8c76556 100644
@@ -33,11 +33,11 @@ int TST_TOTAL = 1;
 
 static char ltpuser1[] = "nobody";
 static char root[] = "root";
-static struct passwd *getpwnam(), *ltpuser1pwent, *rootpwent;
+static struct passwd *ltpuser1pwent, *rootpwent;
 static gid_t mygid;
 
-static static void setup(void);
-static static void cleanup(void);
+static void setup(void);
+static void cleanup(void);
 
 int main(int ac, char **av)
 {
Signature · 13 lines
1.8.1.2


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw

----- Original Message -----

Quoted 10 lines

From: "Vinson Lee" <[email protected]>
To: [email protected]
Sent: Thursday, 12 September, 2013 10:24:39 PM
Subject: [LTP] [PATCH] setgid03.c: Fix build.

From: Vinson Lee <[email protected]>

This patch fixes build errors introduced with commit 7dc42c97696f135e1fef92e612ecc66bf8d74318.

Quoted 8 lines

setgid03.c:36:23: error: static declaration of ‘getpwnam’ follows non-static declaration
In file included from setgid03.c:24:0:
/usr/include/pwd.h:117:23: note: previous declaration of ‘getpwnam’ was here setgid03.c:39:1: error: duplicate ‘static’
setgid03.c:40:1: error: duplicate ‘static’

Committed.
Zhouping I added your signed-off-by to this patch as it was identical.

Thank you,
Jan

Quoted 28 lines
---
 testcases/kernel/syscalls/setgid/setgid03.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/setgid/setgid03.c +3 -4
index 8b71401..8c76556 100644
@@ -33,11 +33,11 @@ int TST_TOTAL = 1;
 
 static char ltpuser1[] = "nobody";
 static char root[] = "root";
-static struct passwd *getpwnam(), *ltpuser1pwent, *rootpwent;
+static struct passwd *ltpuser1pwent, *rootpwent;
 static gid_t mygid;
 
-static static void setup(void);
-static static void cleanup(void);
+static void setup(void);
+static void cleanup(void);
 
 int main(int ac, char **av)
 {
--

1.8.1.2

Quoted 11 lines

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list