Module: kamailio Branch: master Commit: 8cd194d49759a4b14b906265837eb653cfff7a79 URL: https://github.com/kamailio/kamailio/commit/8cd194d49759a4b14b906265837eb653...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: GitHub noreply@github.com Date: 2017-03-15T09:54:40+01:00
Merge pull request #1033 from dunst0/fixpdbt
utils/pdbt: FreeBSD fix, gcc is hardcoded, header is missing
---
Modified: utils/pdbt/Makefile Modified: utils/pdbt/pdbt.c
---
Diff: https://github.com/kamailio/kamailio/commit/8cd194d49759a4b14b906265837eb653... Patch: https://github.com/kamailio/kamailio/commit/8cd194d49759a4b14b906265837eb653...
---
diff --git a/utils/pdbt/Makefile b/utils/pdbt/Makefile index b16d3cb..e354f6c 100644 --- a/utils/pdbt/Makefile +++ b/utils/pdbt/Makefile @@ -1,3 +1,11 @@ +#set some vars from the environment (and not make builtins) +CC := $(shell echo "$${CC}") + +# find compiler name & version +ifeq ($(CC),) + CC=gcc +endif + .phony: all clean install
header=common.h carrier.h dt.h dtm.h pdb_server_backend.h log.h @@ -10,13 +18,13 @@ extdep=Makefile all: pdbt pdb_server
$(obj): %.o : %.c %.h $(header) $(extdep) - gcc $(cflags) -c $< + $(CC) $(cflags) -c $<
pdbt: pdbt.c $(obj) $(header) $(extdep) - gcc $(cflags) -o $@ $< $(obj) + $(CC) $(cflags) -o $@ $< $(obj)
pdb_server: pdb_server.c $(pdb_server_obj) $(header) $(extdep) - gcc $(cflags) -o $@ $< $(pdb_server_obj) + $(CC) $(cflags) -o $@ $< $(pdb_server_obj)
clean: rm -f *~ *.o pdbt pdb_server diff --git a/utils/pdbt/pdbt.c b/utils/pdbt/pdbt.c index fac466a..afd3695 100644 --- a/utils/pdbt/pdbt.c +++ b/utils/pdbt/pdbt.c @@ -28,6 +28,7 @@ #include <poll.h> #include <ctype.h> #include <sys/socket.h> +#include <sys/stat.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h>