From patchwork Fri Aug 18 09:15:49 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ville_Skytt=C3=A4?= X-Patchwork-Id: 12375 Received: from smtp4.pp.htv.fi ([213.243.153.38]) by www.linuxtv.org with esmtp (Exim 4.50) id 1GE0SF-0005xs-Cj for vdr@linuxtv.org; Fri, 18 Aug 2006 11:15:51 +0200 Received: from [192.168.2.5] (cs181056070.pp.htv.fi [82.181.56.70]) by smtp4.pp.htv.fi (Postfix) with ESMTP id 02AC65BC095 for ; Fri, 18 Aug 2006 12:15:49 +0300 (EEST) Subject: Re: [vdr] Build failures on Ubuntu - gettid related From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: VDR Mailing List In-Reply-To: <1155646340.7895.21.camel@localhost.localdomain> References: <20060815021857.GA8201@spork.qfe3.net> <1155637903.7895.16.camel@localhost.localdomain> <20060815123119.GA26885@spork.qfe3.net> <1155646340.7895.21.camel@localhost.localdomain> Date: Fri, 18 Aug 2006 12:15:49 +0300 Message-Id: <1155892549.2784.9.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 (2.6.3-1.fc5.5) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2006 09:15:51 -0000 Status: O X-Status: X-Keywords: X-UID: 10453 On Tue, 2006-08-15 at 14:52 +0200, Jens Auer wrote: > The gettid function is not defined in any header, if it interpret the > source correctly. The _syscall0-macro expands to a function definition > pid_t gettid(void). _syscallX are not available for userspace in recent kernel headers (since April), this causes VDR compilation failures also with the current Fedora Core 6 test versions. More info: http://tinyurl.com/qaydh , http://lkml.org/lkml/2006/6/4/128 The attached patch appears to work for me, and from a bit of Googling I get the impression that it should probably work with all kernel header sets since 2.4.20. --- thread.c~ 2006-06-02 16:51:39.000000000 +0300 +++ thread.c 2006-08-18 01:26:24.000000000 +0300 @@ -318,7 +318,5 @@ -_syscall0(pid_t, gettid) - tThreadId cThread::ThreadId(void) { - return gettid(); + return syscall(__NR_gettid); }