Skip to content

Commit

Permalink
Merge branch 'master' into coverity_scan
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Jan 29, 2020
2 parents 44f52da + 286ab28 commit 7a03a8d
Show file tree
Hide file tree
Showing 861 changed files with 24,170 additions and 12,933 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -14,7 +14,7 @@ addons:
- bison
- libsqlite3-dev
- libsctp-dev
- libradiusclient-ng-dev
- libradcli-dev
- libhiredis-dev
- unixodbc-dev
- libconfuse-dev
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Expand Up @@ -46,9 +46,6 @@ skip_modules?=
# whether or not to overwrite TLS certificates
tls_overwrite_certs?=

# default debian version when running 'make deb'
DEBIAN_VERSION ?= jessie #TODO: can we determine this?

makefile_defs=0
DEFS:= $(DEFS_EXTRA_OPTS)
DEBUG_PARSER?=
Expand Down Expand Up @@ -468,7 +465,7 @@ sunpkg:

.PHONY: install-app install-modules-all install
# Install app only, excluding console, modules and module docs
install-app: app mk-install-dirs install-cfg install-bin \
install-app: mk-install-dirs install-cfg install-bin \
install-app-doc install-man

# Install all module stuff (except modules-docbook?)
Expand Down Expand Up @@ -514,7 +511,7 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
$(cfg_prefix)/$(cfg_dir)$(NAME).cfg; \
fi

install-bin: $(bin_prefix)/$(bin_dir) opensipsmc utils
install-bin: app $(bin_prefix)/$(bin_dir) opensipsmc utils
# install opensips binary
$(INSTALL_TOUCH) $(bin_prefix)/$(bin_dir)/$(NAME)
$(INSTALL_BIN) $(NAME) $(bin_prefix)/$(bin_dir)
Expand Down
25 changes: 23 additions & 2 deletions Makefile.defs
Expand Up @@ -62,9 +62,9 @@ MAIN_NAME=opensips

#version number
VERSION_MAJOR = 3
VERSION_MINOR = 0
VERSION_MINOR = 1
VERSION_SUBMINOR = 0
VERSION_BUILD = beta
VERSION_BUILD = dev

ifneq (,$(VERSION_BUILD))
RELEASE=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_SUBMINOR)-$(VERSION_BUILD)
Expand Down Expand Up @@ -1652,6 +1652,27 @@ $(warning No locking method found so far, trying SYS V sems)
found_lock_method=yes
endif

# override pthread functions for libssl >= 1.1
TWEAK_DEFS=
TWEAK_LIBS=
ifeq ($(CROSS_COMPILE),)
SSL_BUILDER=$(shell \
if pkg-config --exists libssl; then \
echo 'pkg-config libssl'; \
fi)
endif

ifneq ($(SSL_BUILDER),)
VER = $(shell $(SSL_BUILDER) --modversion | \
awk -F. '{print $$1 * 100 + $$2}')
# test if we have a version higher or equal than 1.1
ifeq ($(shell test $(VER) -ge 101; echo $$?),0)
TWEAK_DEFS = -pthread
TWEAK_LIBS = -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions
endif
endif


## Unit Testing - required extensions
ifeq (1,$(shell grep -c '^\DEFS+= -DUNIT_TESTS' Makefile.conf))
DEFS := $(DEFS) -DUNIT_TESTS
Expand Down
4 changes: 2 additions & 2 deletions Makefile.rules
Expand Up @@ -37,14 +37,14 @@ $(NAME): $(objs) $(extra_objs) $(ALLDEP)
ifeq (,$(FASTER))
@echo "Linking $(NAME)"
endif
$(Q)$(LD) $(LDFLAGS) $(objs) $(extra_objs) $(LIBS) -o $(NAME)
$(Q)$(LD) $(LDFLAGS) $(objs) $(extra_objs) $(LIBS) $(TWEAK_LIBS) -o $(NAME)


main.o: main.c $(ALLDEP) $(NEWREVISION)
ifeq (,$(FASTER))
@echo "Compiling $<"
endif
$(Q)$(CC) $(CFLAGS) $(DEFS) -c $< -o $@
$(Q)$(CC) $(CFLAGS) $(DEFS) $(TWEAK_DEFS) -c $< -o $@

.PHONY: all
all: $(NAME) modules
Expand Down
2 changes: 1 addition & 1 deletion Makefile.test
Expand Up @@ -2,7 +2,7 @@

ensure_test_defs:
@! grep -q '^DEFS+= -DUNIT_TESTS' Makefile.conf && \
echo -e '\nDEFS+= -DUNIT_TESTS' >> Makefile.conf && \
echo '\nDEFS+= -DUNIT_TESTS' >> Makefile.conf && \
echo "-DUNIT_TESTS was not enabled in Makefile.conf," \
"run 'make test' again." && exit 1 || true

Expand Down

0 comments on commit 7a03a8d

Please sign in to comment.