From: Maxim Mamontov Date: Mon, 20 Dec 2010 14:53:44 +0000 (+0200) Subject: Виправлено помилки компіляції на FreeBSD8 X-Git-Tag: 2.407-rc3~226 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/1751c97b59fa9359458012716944d3cdc540bb41?hp=7c36dd290e65ef4ad773543ce2641e1c83c28600 Виправлено помилки компіляції на FreeBSD8 --- diff --git a/projects/rlm_stg/build b/projects/rlm_stg/build index e1102fc4..8f45a87b 100755 --- a/projects/rlm_stg/build +++ b/projects/rlm_stg/build @@ -84,6 +84,7 @@ else fi fi SHELL="/usr/local/bin/bash" + CXXFLAGS="$CXXFLAGS -DHAVE_CLOSEFROM" fi echo -n "Checking endianess... " diff --git a/projects/rlm_stg/libradius.h b/projects/rlm_stg/libradius.h index 4e926bfd..a8feaaab 100644 --- a/projects/rlm_stg/libradius.h +++ b/projects/rlm_stg/libradius.h @@ -28,6 +28,7 @@ //RCSIDH(libradius_h, "$Id: libradius.h,v 1.1 2010/08/14 04:13:52 faust Exp $") #include +#include #include #include diff --git a/projects/rlm_stg/radiusd.h b/projects/rlm_stg/radiusd.h index a5a61b93..4cbf4034 100644 --- a/projects/rlm_stg/radiusd.h +++ b/projects/rlm_stg/radiusd.h @@ -169,7 +169,7 @@ typedef enum RAD_LISTEN_TYPE { RAD_LISTEN_MAX } RAD_LISTEN_TYPE; -#ifdef FREE_BSD +#if defined(FREE_BSD) || defined(FREE_BSD5) #include #endif diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile index d0a5550c..60288877 100644 --- a/projects/sgconf_xml/Makefile +++ b/projects/sgconf_xml/Makefile @@ -49,8 +49,8 @@ all: libs $(PROG) ../../Makefile.conf libs: $(MAKE) -C $(DIR_LIBSRC) -$(PROG): $(OBJS) $(LIBS) - $(CC) $^ $(LDFLAGS) -o $(PROG) +$(PROG): $(OBJS) $(STGLIBS) + $(CC) $^ $(LIBS) $(LDFLAGS) -o $(PROG) clean: rm -f deps $(PROG) *.o tags *.*~ .OS @@ -95,8 +95,8 @@ deps: $(SRCS) ../../Makefile.conf $(MAKE) -C $(DIR_LIBSRC) includes @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\ - echo -e '\t$$(CC) -c $$< $(CFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\ + echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\ + echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\ done diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index a4857105..ae08b781 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -115,7 +115,7 @@ rm -f fake echo -n "Checking for -lexpat... " echo "int main() { return 0; }" > build_check.c -gcc build_check.c -lexpat -o fake > /dev/null 2> /dev/null +gcc $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_EXPAT=no