Problem with /usr/include/sys/thread.h

Vinicius Santos vininim at
Sat Apr 21 14:31:24 PDT 2007

On 4/15/07, Hasso Tepper <hasso at> wrote:
Simon 'corecode' Schubert wrote:
> Hasso Tepper wrote:
> > There is string "template" used in two places (line 334 and 408). It
> > causes problems for C++ in which template is reserved keyword.
> No problem fixing this, but I'm curious:  what are you doing with
> sys/thread.h and C++?
It's included indirectly. The code includes <sys/user.h>:

In file included from /usr/include/sys/lock.h:53,
                 from /usr/include/sys/proc.h:57,
                 from /usr/include/sys/user.h:73,
/usr/include/sys/thread.h:334: error: expected `,' or `...' before "template"
/usr/include/sys/thread.h:408: error: expected `,' or `...' before "template"
The code is KDE ksysguard - system monitoring including ps, top etc
functionality, so it needs kinfo_proc.
Tried using extern "C" {} around the C include files?


Hasso Tepper

More information about the Kernel mailing list