fix compilation on mac os x

based on a patch by Leif Middelschulte


SVN revision: 46911
This commit is contained in:
Vincent Torri 2010-03-06 16:46:08 +00:00
parent 1c3a3b2a5d
commit 23f3dae076
2 changed files with 12 additions and 2 deletions

View File

@ -94,6 +94,12 @@ dnl managed by evil
have_socket="yes"
AC_CHECK_LIB([socket], [connect], [], [have_socket="no"])
;;
darwin*)
ELM_UNIX_DEF="#define"
have_socket="yes"
AC_CHECK_HEADERS([crt_externs.h])
AC_DEFINE([environ], [(*_NSGetEnviron())], [apple doesn't follow POSIX in this case.])
;;
*)
ELM_UNIX_DEF="#define"
AC_CHECK_FUNCS(dlopen, res=yes, res=no)

View File

@ -1,11 +1,15 @@
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <dlfcn.h> /* dlopen,dlclose,etc */
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#ifdef HAVE_CRT_EXTERNS_H
# include <crt_externs.h>
#endif
#ifdef HAVE_EVIL