lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

1003-Fix-dl-cross-compiling-issue.patch (1806B)


      1 --- a/configure.in
      2 +++ b/configure.in
      3 @@ -453,7 +453,10 @@ PHP_CHECK_FUNC(gethostname, nsl)
      4  PHP_CHECK_FUNC(gethostbyaddr, nsl)
      5  PHP_CHECK_FUNC(yp_get_default_domain, nsl)
      6  
      7 -PHP_CHECK_FUNC(dlopen, dl)
      8 +PHP_ADD_LIBRARY(dl)
      9 +PHP_DEF_HAVE(dlopen)
     10 +PHP_DEF_HAVE(libdl)
     11 +ac_cv_func_dlopen=yes
     12  if test "$ac_cv_func_dlopen" = "yes"; then
     13    AC_DEFINE(HAVE_LIBDL, 1, [ ])
     14  fi
     15 --- a/ext/fileinfo/config.m4
     16 +++ b/ext/fileinfo/config.m4
     17 @@ -46,6 +46,10 @@ int main(void)
     18      AC_MSG_RESULT(no)
     19      AC_MSG_NOTICE(using libmagic strcasestr implementation)
     20      libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
     21 +  ],[
     22 +    dnl cross-compiling; assume not present
     23 +    AC_MSG_NOTICE(using libmagic strcasestr implementation)
     24 +    libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
     25    ])
     26  
     27    PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
     28 --- a/ext/opcache/config.m4
     29 +++ b/ext/opcache/config.m4
     30 @@ -227,7 +227,14 @@ AC_TRY_RUN([
     31  	flock_type=linux
     32      AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
     33      AC_MSG_RESULT("yes")
     34 -], AC_MSG_RESULT("no") )
     35 +], [
     36 +    AC_MSG_RESULT("no")
     37 +], [
     38 +    dnl cross-compiling; assume Linux
     39 +	flock_type=linux
     40 +    AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
     41 +    AC_MSG_RESULT("yes")
     42 +])
     43  
     44  AC_MSG_CHECKING("whether flock struct is BSD ordered")
     45  AC_TRY_RUN([
     46 @@ -243,7 +250,12 @@ AC_TRY_RUN([
     47  	flock_type=bsd
     48      AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) 
     49      AC_MSG_RESULT("yes")
     50 -], AC_MSG_RESULT("no") )
     51 +], [
     52 +    AC_MSG_RESULT("no")
     53 +], [
     54 +    dnl cross-compiling; assume Linux
     55 +    AC_MSG_RESULT("no")
     56 +])
     57  
     58  if test "$flock_type" == "unknown"; then
     59  	AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])