On Jun 22, 2005, at 05:05, Andreas Dittrich wrote:
I have a problem compiling pwlib. There is a duplicate typedef
which is different in
/usr/include/sys/socket.h
than in
./pwlib/include/ptlib/unix/ptlib/pmachdep.h
of the package. The one in the package defines int as the type of
the socketlen
Prior to Tiger, our system headers did not define socklen_t.
Packages that needed socklen_t defined it themselves as int. Now on
Tiger, we have socklen_t. However, some packages which had socklen_t
definitions inserted are still using those definitions on Tiger,
either because they're coming in from a patchscript/SetCFLAGS or
because the upstream developers assumed "if it's Darwin, we need to
define socklen_t".
The solution is to remove the socklen_t definitions from the package
or conditionalize them on the MacOS version. In the case of pwlib,
there's no mention of socklen_t in the info or patch file. Grepping
the source for socklen_t, the most likely candidate for where the
define is coming from is include/ptlib/unix/ptlib/pmachdep.h. There
are several defines of socklen_t in that file, conditionalized on
various macros. To fix the package, figure out which one is applying
on Darwin, and wrap it with the following:
#ifdef __APPLE__
#include <AvailabilityMacros.h>
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
typedef int socklen_t;
#endif
#endif
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel