Version: 4.3.90 (using Devel) Compiler: Sun Studio 12 U1 OS: Solaris Installed from: Compiled sources building kdenetwork 4.3.90 on OpenSolaris with Sun Studio fails with ... "/home/test/packages/BUILD/kdenetwork-4.3.90/kget/transfer-plugins/bittorrent/libbtcore/util/fileops.cpp", line 474: Error: NAME_MAX is not defined. "/home/test/packages/BUILD/kdenetwork-4.3.90/kget/transfer-plugins/bittorrent/libbtcore/util/fileops.cpp", line 497: Error: NAME_MAX is not defined. "/home/test/packages/BUILD/kdenetwork-4.3.90/kget/transfer-plugins/bittorrent/libbtcore/util/fileops.cpp", line 503: Error: NAME_MAX is not defined. "/home/test/packages/BUILD/kdenetwork-4.3.90/kget/transfer-plugins/bittorrent/libbtcore/util/fileops.cpp", line 562: Error: NAME_MAX is not defined. 4 Error(s) detected. after some investigation I came to this comment in the /usr/include/limits.h header file. /* * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the * related text states: * * A definition of one of the values from Table 2-5 shall be omitted from the * <limits.h> on specific implementations where the corresponding value is * equal to or greater than the stated minimum, but where the value can vary * depending on the file to which it is applied. The actual value supported for * a specific pathname shall be provided by the pathconf() (5.7.1) function. * * This is clear that any machine supporting multiple file system types * and/or a network can not include this define, regardless of protection * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags. * * #define NAME_MAX 14 */ I'm not sure if switching to pathconf() is feasible. We're using the attached patch which is merely a hack (its second part is dealing with other bug)
Please try if KTorrent compiles from you, it should have the same problem as that code is part of KTorrent.
Yup indeed, this is definitely a KTorrent issue... apart from that, there's no patch attached :/ Lukas
Created attachment 39857 [details] patch
SVN commit 1084197 by guisson: Fix compilation not working on solaris due to missing NAME_MAX define BUG: 222598 M +1 -0 ChangeLog M +2 -4 libbtcore/diskio/singlefilecache.cpp M +4 -0 libbtcore/util/fileops.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1084197