mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
Make building on OSX work out of the box (#18)
Conditionally declare strlcat() and strlcpy() in proxytunnel.h Conditionally include strlcat.o and strlcpy.o in Makefile
This commit is contained in:
parent
ee962a3e90
commit
0cfce96280
2 changed files with 12 additions and 2 deletions
8
Makefile
8
Makefile
|
|
@ -63,8 +63,6 @@ mandir = $(datadir)/man
|
|||
# Remove strlcpy/strlcat on (open)bsd/darwin systems
|
||||
OBJ = proxytunnel.o \
|
||||
base64.o \
|
||||
strlcpy.o \
|
||||
strlcat.o \
|
||||
strzcat.o \
|
||||
setproctitle.o \
|
||||
io.o \
|
||||
|
|
@ -76,6 +74,12 @@ OBJ = proxytunnel.o \
|
|||
ntlm.o \
|
||||
ptstream.o
|
||||
|
||||
UNAME = $(shell uname)
|
||||
ifneq ($(UNAME),Darwin)
|
||||
OBJ += strlcpy.o \
|
||||
strlcat.o
|
||||
endif
|
||||
|
||||
.PHONY: all clean docs install
|
||||
|
||||
all: proxytunnel
|
||||
|
|
|
|||
|
|
@ -32,8 +32,14 @@ void closeall();
|
|||
void do_daemon();
|
||||
void initsetproctitle(int argc, char *argv[]);
|
||||
void setproctitle(const char *fmt, ...);
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
/* Don't include strlcat and strlcpy since they are provided as macros on OSX */
|
||||
#else
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
size_t strzcat(char *dst, char *format, ...);
|
||||
int main( int argc, char *argv[] );
|
||||
char * readpassphrase(const char *, char *, size_t, int);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue