aboutsummaryrefslogtreecommitdiffstats
path: root/main/s390-tools/argz.patch
blob: f7b3836f6557531ebce3ade5371526e72b4fb88d (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
diff --git a/Makefile b/Makefile
index 6081acc..fe8dd2f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/ar
 # Include common definitions
 include common.mak
 
-LIB_DIRS = libvtoc libutil libzds libdasd libvmdump libccw libvmcp libekmfweb
+LIB_DIRS = libargz libvtoc libutil libzds libdasd libvmdump libccw libvmcp libekmfweb
 TOOL_DIRS = zipl zdump fdasd dasdfmt dasdview tunedasd \
 	   tape390 osasnmpd qetharp ip_watcher qethconf scripts zconf \
 	   vmconvert vmcp man mon_tools dasdinfo vmur ipl_tools \
diff --git a/common.mak b/common.mak
index 0a5fd69..c6f429c 100644
--- a/common.mak
+++ b/common.mak
@@ -329,6 +329,10 @@ endif
 # check the library directory via "make -C" when the tools Makefile is
 # processed.
 
+$(rootdir)/libargz/libargz.a: $(rootdir)/libargz
+	$(MAKE) -C $(rootdir)/libargz/ libargz.a
+.PHONY: $(rootdir)/libargz
+
 $(rootdir)/libutil/libutil.a: $(rootdir)/libutil
 	$(MAKE) -C $(rootdir)/libutil/ libutil.a
 .PHONY: $(rootdir)/libutil
diff --git a/zconf/chp/Makefile b/zconf/chp/Makefile
index 2e3065f..486d469 100644
--- a/zconf/chp/Makefile
+++ b/zconf/chp/Makefile
@@ -2,7 +2,7 @@ include ../../common.mak
 
 all: chchp lschp
 
-libs =	$(rootdir)/libutil/libutil.a
+libs =	$(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
 
 chchp: chchp.o $(libs)
 lschp: lschp.o $(libs)
diff --git a/zconf/css/Makefile b/zconf/css/Makefile
index 2a36820..749cc6e 100644
--- a/zconf/css/Makefile
+++ b/zconf/css/Makefile
@@ -2,7 +2,8 @@
 include ../../common.mak
 
 libs =	$(rootdir)/libccw/libccw.a \
-	$(rootdir)/libutil/libutil.a
+	$(rootdir)/libutil/libutil.a \
+	$(rootdir)/libargz/libargz.a
 
 objects = lscss.o misc.o
 
diff --git a/zconf/qeth/Makefile b/zconf/qeth/Makefile
index 43716a3..f69d4f0 100644
--- a/zconf/qeth/Makefile
+++ b/zconf/qeth/Makefile
@@ -2,7 +2,7 @@ include ../../common.mak
 
 all: lsqeth
 
-libs = $(rootdir)/libvmcp/libvmcp.a $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libvmcp/libvmcp.a $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
 
 lsqeth: lsqeth.o misc.o $(libs)
 
diff --git a/zconf/scm/Makefile b/zconf/scm/Makefile
index 12faf44..1d9ec36 100644
--- a/zconf/scm/Makefile
+++ b/zconf/scm/Makefile
@@ -2,7 +2,7 @@ include ../../common.mak
 
 all: lsscm
 
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
 
 lsscm: lsscm.o $(libs)
 
diff --git a/zconf/zcrypt/Makefile b/zconf/zcrypt/Makefile
index d075f34..a1744a4 100644
--- a/zconf/zcrypt/Makefile
+++ b/zconf/zcrypt/Makefile
@@ -2,7 +2,7 @@
 
 all: chzcrypt lszcrypt zcryptctl zcryptstats
 
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
 
 chzcrypt: chzcrypt.o misc.o $(libs)
 lszcrypt: lszcrypt.o misc.o $(libs)
diff --git a/zkey/Makefile b/zkey/Makefile
index a44b14b..48c02fb 100644
--- a/zkey/Makefile
+++ b/zkey/Makefile
@@ -32,7 +32,7 @@
 	INSTALL_TARGETS += zkey-cryptsetup-skip-cryptsetup2
 endif
 
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
 
 CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\"

@@ -90,11 +90,11 @@
 			ep11.h misc.h utils.h
 kms.o: kms.c kms.h kms-plugin.h utils.h pkey.h
 
-zkey: LDLIBS = -ldl -lcrypto
+zkey: LDLIBS = -ldl -lcrypto $(LIBEXECINFO_LIBS)
 zkey: zkey.o pkey.o cca.o ep11.o properties.o keystore.o utils.o kms.o $(libs)
 	$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
 
-zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c -lcrypto
+zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c -lcrypto $(LIBEXECINFO_LIBS)
 zkey-cryptsetup: zkey-cryptsetup.o pkey.o cca.o ep11.o utils.o $(libs)
 	$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
 
--- a/zkey/ekmfweb/Makefile
+++ b/zkey/ekmfweb/Makefile
@@ -5,7 +5,7 @@ VERM = $(shell echo $(VERSION) | cut -d
 
 all: zkey-ekmfweb.so
 
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
 
 zkey-ekmfweb.o: zkey-ekmfweb.c zkey-ekmfweb.h ../kms-plugin.h \
 	../cca.h ../utils.h ../pkey.h ../properties.h \
@@ -27,7 +27,8 @@ utils.o: ../utils.c ../utils.h ../pkey.h
 	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@
 
 zkey-ekmfweb.so: ALL_CFLAGS += -fPIC
-zkey-ekmfweb.so: LDLIBS = -L$(rootdir)/libekmfweb -lekmfweb -ldl -lcrypto
+zkey-ekmfweb.so: LDLIBS = -L$(rootdir)/libekmfweb -lekmfweb -ldl -lcrypto \
+	$(LIBEXECINFO_LIBS)
 zkey-ekmfweb.so: ALL_LDFLAGS += -shared -Wl,--version-script=zkey-ekmfweb.map \
 	-Wl,-z,defs,-Bsymbolic -Wl,-soname,zkey-ekmfweb.so.$(VERM)
 zkey-ekmfweb.so: zkey-ekmfweb.o properties.o pkey.o cca.o ep11.o utils.o $(libs)
diff --git a/zkey/keystore.c b/zkey/keystore.c
index 9dcac07..2f87798 100644
--- a/zkey/keystore.c
+++ b/zkey/keystore.c
@@ -23,6 +23,7 @@
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <fcntl.h>
 
 #include "lib/util_base.h"
 #include "lib/util_libc.h"
diff --git a/libutil/Makefile b/libutil/Makefile
index ca90f2a..3042f3d 100644
--- a/libutil/Makefile
+++ b/libutil/Makefile
@@ -1,6 +1,6 @@
 include ../common.mak
 
-lib = libutil.a
+lib = libutil.a $(rootdir)/libargz/libargz.a
 
 examples =	util_base_example \
 		util_panic_example \