On 08/07/2012 12:55 AM, Vinson Lee wrote:
> On Sun, Aug 5, 2012 at 6:42 PM, Wanlong Gao <[email protected]> wrote:
>> On 08/04/2012 06:29 AM, Vinson Lee wrote:
>>> This patch fixes this build error with clang.
>>>
>>> testcases/kernel/syscalls/rt_sigaction/../../../../include/ltp_signal.h:85: 
>>> undefined reference to `handler_h'
>>
>> If you wanna build LTP with LLVM, why not make out "a path for LLVM 
>> building" and send
>> out it. I think this one line change can't do everything for LLVM building, 
>> although
>> untested. right?
>>
>> Thanks,
>> Wanlong Gao
>>
> 
> This was the only build error with I saw with clang. This one change
> fixes the build with clang.
> 
> It's a C99 error which would probably occur with gcc -std=c99 as well.
> http://clang.llvm.org/compatibility.html#inline

I saw that "Change add to a static inline function. 
This is usually the right solution if only one translation
unit needs to use the function. static inline functions are
always resolved within the translation unit, so you won't have
to add a non-inline definition of the function elsewhere in your program."

So, why not just change it to "static inline" to resolve this?

Thanks,
Wanlong Gao

> 
> 
>>>
>>> Signed-off-by: Vinson Lee <[email protected]>
>>> ---
>>>  include/ltp_signal.h |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/ltp_signal.h b/include/ltp_signal.h
>>> index 1ac6f70..093059f 100644
>>> --- a/include/ltp_signal.h
>>> +++ b/include/ltp_signal.h
>>> @@ -69,7 +69,7 @@ struct kernel_sigaction {
>>>
>>>  void (*restore_rt) (void);
>>>
>>> -inline void
>>> +void
>>>  handler_h (int signal)
>>>  {
>>>       return;
>>>
>>
> 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to