summaryrefslogtreecommitdiff
blob: ecef517b1ca33adf8aa6ebc099b3b2188081d38d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
 - drop ldconfig junk
 - fix types used in socket functions (socklen_t, not int)

http://bugs.gentoo.org/126977
 - respect user LDFLAGS

http://bugs.gentoo.org/126695
 - add missing headers
 - add missing comma to supp_entry

http://bugs.gentoo.org/137134
 - don't show traditional warnings

--- Makefile
+++ Makefile
@@ -71,7 +71,7 @@
 
 WARNINGS += -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
 	-Wcast-qual -Wcast-align \
-	-Wtraditional -Wstrict-prototypes -Wmissing-prototypes \
+	-Wstrict-prototypes -Wmissing-prototypes \
 	-Wnested-externs -Winline -Wshadow 
 INCLUDEDIR=-I$(CRTDIR)/include
 
--- libpwdb/Makefile
+++ libpwdb/Makefile
@@ -50,7 +50,7 @@
 
 
 $(LIBDYNAME): $(LIBOBJ)
-	$(LD) -soname $(LIBSONAME) -x -shared -o $(LIBFILENAME) $(LIBOBJ) -lcrypt -lnsl -lc
+	$(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,$(LIBSONAME) -Wl,-x -o $(LIBFILENAME) $(LIBOBJ)  -lcrypt -lnsl $(LDLIBS)
 	@ln -sf $(LIBFILENAME) $@
 
 $(LIBSTATIC): $(LIBOBJ)
@@ -68,7 +68,7 @@
 	$(INSTALL) -m 644 radius.h $(INCLUDED)/radius.h
 	$(INSTALL) -m 644 _pwdb_macros.h $(INCLUDED)/_pwdb_macros.h
 	$(INSTALL) -m 755 $(LIBFILENAME) $(LIBDIR)
-	$(LDCONFIG)
+	ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBSONAME)
 	ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBDYNAME)
 	$(INSTALL) -m 644 $(LIBSTATIC) $(LIBDIR)
 
--- libpwdb/posix/pwd.c
+++ libpwdb/posix/pwd.c
@@ -7,6 +7,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 
 #define PWDB_HARD_CORE 1
 #include <pwdb/pwdb_public.h>
--- libpwdb/posix/undefined.c
+++ libpwdb/posix/undefined.c
@@ -5,6 +5,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 
 #define PWDB_HARD_CORE 1
 #include <pwdb/pwdb_public.h>
--- libpwdb/pwdb/pwdb_helper.c
+++ libpwdb/pwdb/pwdb_helper.c
@@ -18,6 +18,7 @@
  *
  */
 
+#include <string.h>
 #include "pwdb_public.h"
 #include "pwdb_module.h"
 
--- libpwdb/pwdb/interface/shadow/group.c
+++ libpwdb/pwdb/interface/shadow/group.c
@@ -533,7 +533,7 @@
 
     static const char *supp_entry[] = {
     "group", "passwd",
-    "users", "admins"       /* these are from /etc/group */
+    "users", "admins",      /* these are from /etc/group */
     "groups",               /* these are serviced by requests */
     NULL
     };
--- libpwdb/radius/radius.c
+++ libpwdb/radius/radius.c
@@ -145,7 +145,7 @@
 		      const char* password,
 		      RADIUS_RESULT *rad_result)
 {
-    int                salen;
+    socklen_t          salen;
     int                sockfd;
     struct sockaddr    saremote;
     struct sockaddr_in *s_in;
@@ -333,7 +333,7 @@
                        const char* new_password,
 		       RADIUS_RESULT *rad_result)
 {
-    int salen;
+    socklen_t salen;
     int sockfd;
     struct sockaddr saremote;
     struct sockaddr_in *s_in;
@@ -535,7 +535,7 @@
                       int sense,
                       int session_time)
 {
-    int salen;
+    socklen_t salen;
     int sockfd;
     struct sockaddr saremote;
     struct sockaddr_in *s_in;