From f36047098c44530787d03cca2887a104570bc238 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Fri, 23 Oct 2009 23:06:16 +0000 Subject: [PATCH] * Add bits for static linking. --- Makefile | 1 + minidlna.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index ae0a4f4..7761826 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ BASEOBJS = minidlna.o upnphttp.o upnpdescgen.o upnpsoap.o \ ALLOBJS = $(BASEOBJS) $(LNXOBJS) LIBS = -lexif -ljpeg -lsqlite3 -lavformat -lid3tag -lFLAC -lvorbis +#STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o diff --git a/minidlna.c b/minidlna.c index 1695ad8..8b361aa 100644 --- a/minidlna.c +++ b/minidlna.c @@ -184,6 +184,7 @@ getfriendlyname(char * buf, int len) #else char * logname; logname = getenv("LOGNAME"); +#if 1 // Disable for static linking if( !logname ) { struct passwd * pwent; @@ -191,6 +192,7 @@ getfriendlyname(char * buf, int len) if( pwent ) logname = pwent->pw_name; } +#endif strncat(buf, logname?logname:"Unknown", len-strlen(buf)-1); #endif }