Menu

#1014 patch for cross compilation for libcurl-7.21.6

closed-fixed
5
2013-06-21
2011-05-26
Anonymous
No

When cross compiling libcurl the test for the existence of /dev/random (or $RANDOM) file fails as a result of cross_compiling being set in the environment.

The following patch for libcurl-7.21.6/configure.ac works around this by eliminating the test when cross_compiling is set:

1625c1625,1629
< AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
---
> if test -z "$cross_compiling"; then
> AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
> else
> echo "Not checking for existence of $RANDOM_FILE when cross_compil ing"
> fi

Thanks,
Bill.

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2011-05-30

    The spirit of this fix is now pushed in commit a87102c7923bb29302

    Your exact patch was not working though as

    A) the variable check is wrong (as it contains "no" when not cross-compiling)
    B) the $RANDOM_FILE variable isn't always set

    Thanks!

     
  • Daniel Stenberg

    Daniel Stenberg - 2011-05-30
    • status: open --> closed-fixed