You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Igor Galić (JIRA)" <ji...@apache.org> on 2013/02/05 17:48:11 UTC

[jira] [Created] (TS-1698) thread/pthread mis-match on Solaris 10

Igor Galić created TS-1698:
------------------------------

             Summary: thread/pthread mis-match on Solaris 10
                 Key: TS-1698
                 URL: https://issues.apache.org/jira/browse/TS-1698
             Project: Traffic Server
          Issue Type: Bug
          Components: Core
            Reporter: Igor Galić


{noformat}
  CXX      UnixEventProcessor.o
UnixEventProcessor.cc: In member function 'virtual int EventProcessor::start(int)':
UnixEventProcessor.cc:186:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'ink_thread {aka unsigned int}' [-Werror=format]
UnixEventProcessor.cc:188:9: error: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'ink_thread {aka unsigned int}' [-Werror=format]
cc1plus: all warnings being treated as errors
gmake[2]: *** [UnixEventProcessor.o] Error 1
gmake[2]: Leaving directory `/export/home/buildbot/slave5/tserver-solaris-trunk-debug/build/iocore/eventsystem'
gmake[1]: *** [all-recursive] Error 1
{noformat}

This seems to be caused by our naïve code to distinguish between different platforms:

{code}
#include "P_EventSystem.h"      /* MAGIC_EDITING_TAG */
#include <sched.h>
#if TS_USE_HWLOC

#if HAVE_HWLOC_H
#include <hwloc.h>
#endif

#if HAVE_SCHED_H
#include <sched.h>
#if !defined(solaris) && !defined(freebsd)
typedef cpu_set_t ink_cpuset_t;
#define PTR_FMT PRIuPTR
#endif
#endif

#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif

#if HAVE_SYS_CPUSET_H
#include <sys/cpuset.h>
typedef cpuset_t ink_cpuset_t;
#define PTR_FMT "p"
#endif

#if HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif

#if HAVE_SYS_PSET_H
#include <sys/pset.h>
typedef psetid_t ink_cpuset_t;
#define PTR_FMT PRIuPTR
#endif

#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

#endif
#include "ink_defs.h"

#if TS_USE_HWLOC
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira