提交 8ab1bf12 编写于 作者: L Luiz Capitulino 提交者: Michael Roth

configure: check if environ is declared

Some systems may declare environ automatically, others don't. Check for it.
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 aeb29b64
......@@ -2831,6 +2831,21 @@ if compile_prog "" "" ; then
linux_magic_h=yes
fi
########################################
# check if environ is declared
has_environ=no
cat > $TMPC << EOF
#include <unistd.h>
int main(void) {
environ = environ;
return 0;
}
EOF
if compile_prog "" "" ; then
has_environ=yes
fi
##########################################
# End of CC checks
# After here, no more $cc or $ld runs
......@@ -3342,6 +3357,10 @@ if test "$linux_magic_h" = "yes" ; then
echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak
fi
if test "$has_environ" = "yes" ; then
echo "CONFIG_HAS_ENVIRON=y" >> $config_host_mak
fi
# USB host support
case "$usb" in
linux)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册