http://llvm.org/bugs/show_bug.cgi?id=16447

            Bug ID: 16447
           Summary: [PATCH] fix potential FreeBSD build problem
                    (<pthread_np.h> not included)
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 10761
  --> http://llvm.org/bugs/attachment.cgi?id=10761&action=edit
patch

Improper use of __FreeBSD_kernel__ in source/Host/common/Host.cpp excludes
FreeBSD from the code section it was intended for:

#elif defined (__linux__) || defined(__FreeBSD_kernel__)
[...]
#elif defined (__FreeBSD__)
[...]
#endif

Please note, that __FreeBSD_kernel__ implies a FreeBSD kernel, but it doesn't
imply anything about userland. So, when checking for this macro you may match
any system that uses the kernel of FreeBSD, including FreeBSD itself.

As recent versions of FreeBSD define this macro [1], the first code section is
being skipped, which doesn't look like what the original code intended.

A possible solution could be to split the logic for <sys/wait.h> (which is
basically kernel-related) from the logic for <pthread_np.h> (which is
determined by pthread library). See attachment.

[1] See http://svnweb.freebsd.org/base/head/sys/sys/param.h?view=co

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to