Bugzilla – Bug 315836
[PATCH] closesocket aliased on redhat / debian woody
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by bugzilla@gurugeek.com 2004-08-19 15:00:45 MST ---- Description of Problem: closesocket is aliased to close, refer to https://bugzilla.novell.com/show_bug.cgi?id=MONO58848 for more information. Steps to reproduce the problem: 1. Try to compile on redhat 7.2 or RHEL3 Actual Results: Make exits with error below. In file included from ../../mono/io-layer/wapi.h:27, from io.c:35: ../../mono/io-layer/sockets.h:44: conflicting types for `close' /usr/include/unistd.h:305: previous declaration of `close' io.c:1475: warning: `convert_perms' defined but not used make[6]: *** [io.lo] Error 1 Expected Results: Successfully completed make. How often does this happen? Every attempt. Additional Information: Sorry I don't know how to create a patch. The fix is easy though, place this line just above the function definition for closesocket in mono/io-layer/sockets.h. #undef closesocket ---- Additional Comments From dick@ximian.com 2004-08-20 05:32:42 MST ---- None of the places where closesocket is defined you listed in the other bug report should be included by a mono build. We don't link to perl, apache, mysql, php or kerberos. ---- Additional Comments From miguel@ximian.com 2004-10-03 14:28:33 MST ---- Seems to be an old OS problem. ---- Additional Comments From will@musc.org.uk 2005-01-15 09:45:40 MST ---- It appears that this is due to Apache modifying /usr/include/fnmatch.h, which is included by mono/io-layers/io.c fnmatch.h includes ap_config.h, which redefines the alias. Ideally, Apache wouldn't break stuff in this way, but this is in no way an 'obsolete OS issue' - this happens on a new SLES-9 box with the latest version of Apache. I would suggest either adding the undef to sockets.h, or renaming closesocket (it's only called by mono/metadata/socket-io.c ---- Additional Comments From dick@ximian.com 2005-01-17 06:48:14 MST ---- This then is an apache bug, not mono, Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Linux localhost 2.4.21-4.0.1.ELsmp #1 SMP Thu Oct 23 01:27:36 EDT 2003 i686 i686 i386 GNU/Linux</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".