summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Cohen <benjamin.cohen@orcam.com>2023-03-26 23:28:24 +0300
committerBenjamin Cohen <benjamin.cohen@orcam.com>2023-03-26 23:28:24 +0300
commit2880e7cfffdd2a5ab797f79dad4f2aa5e35234fd (patch)
tree235ca425b1eda1da0ffe8ff4b002cbe61755efa9
parent2035c4db312c67f2cf2dc3518077b243c5acb98c (diff)
Fix build on debian11debian11
Fix crypto-related undefined reference errors: - add -lcrypto flag - remove CRYPTO_mem_leaks() call
-rw-r--r--src/Makefile6
-rw-r--r--src/supl-cert.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index 5fce587..007e2bc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -21,10 +21,10 @@ DIST = Makefile $(PROGRAM_SOURCE) $(SUPL_C_SOURCE) $(SUPL_ASN1_SOURCE) $(RRLP_AS
all: supl-client supl-proxy supl-cert
supl-client: libsupl.so supl-client.o
- $(CC) -o $@ supl-client.o -L. -lsupl -lssl -lm
+ $(CC) -o $@ supl-client.o -L. -lsupl -lssl -lcrypto -lm
supl-proxy: libsupl.so supl-proxy.o
- $(CC) -o $@ supl-proxy.o -L. -lsupl -lssl -lm
+ $(CC) -o $@ supl-proxy.o -L. -lsupl -lssl -lcrypto -lm
supl-cert: supl-cert.o
$(CC) -o $@ supl-cert.o $(shell pkg-config --libs openssl) -lm
@@ -35,7 +35,7 @@ libsupl.so: libsupl.so.1.0
libsupl.so.1.0: asn-supl/libasnsupl.a asn-rrlp/libasnrrlp.a supl.o
$(CC) -shared -Wl,-soname,libsupl.so.1 -o $@ supl.o \
-Wl,--whole-archive ./asn-supl/libasnsupl.a -Wl,--no-whole-archive \
- ./asn-rrlp/libasnrrlp.a -lssl
+ ./asn-rrlp/libasnrrlp.a -lssl -lcrypto
ln -sf libsupl.so.1.0 libsupl.so.1
asn-supl/libasnsupl.a:
diff --git a/src/supl-cert.c b/src/supl-cert.c
index 0f1a421..f6e3d6a 100644
--- a/src/supl-cert.c
+++ b/src/supl-cert.c
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
X509V3_EXT_cleanup();
OBJ_cleanup();
- CRYPTO_mem_leaks(bio_err);
+ //CRYPTO_mem_leaks(bio_err);
BIO_free(bio_err);
return(0);
}