mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
- Backport upstream patch to fix memory leak
Changes: https://github.com/intel/tinycbor/releases
Reference: 628dee0d65
20 lines
843 B
Text
20 lines
843 B
Text
--- Makefile.orig 2025-03-15 17:43:45 UTC
|
|
+++ Makefile
|
|
@@ -130,7 +130,7 @@ lib/libtinycbor.a: $(TINYCBOR_SOURCES:.c=.o)
|
|
@$(MKDIR) -p lib
|
|
$(AR) cqs $@ $^
|
|
|
|
-lib/libtinycbor.so: $(TINYCBOR_SOURCES:.c=.pic.o)
|
|
+lib/libtinycbor.so: $(TINYCBOR_SOURCES:.c=.o)
|
|
@$(MKDIR) -p lib
|
|
$(CC) -shared -Wl,-soname,libtinycbor.so.$(SOVERSION) -o lib/libtinycbor.so.$(VERSION) $(LDFLAGS) $^ $(LDLIBS)
|
|
cd lib ; ln -sf libtinycbor.so.$(VERSION) libtinycbor.so ; ln -sf libtinycbor.so.$(VERSION) libtinycbor.so.$(SOVERSION)
|
|
@@ -234,7 +234,7 @@ endif
|
|
|
|
%.o: %.c
|
|
@test -d $(@D) || $(MKDIR) $(@D)
|
|
- $(CC) $(cflags) $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $<
|
|
+ $(CC) $(cflags) -fPIC $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $<
|
|
%.pic.o: %.c
|
|
@test -d $(@D) || $(MKDIR) $(@D)
|
|
$(CC) $(cflags) -fPIC $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $<
|