Skip to content

Conversation

Low-power
Copy link

Tested with FreeBSD 10 and 11.

Includes pull request #25 for correct building for FreeBSD i386.

Major changes/fixes:

  • FreeBSD have their own runetype.h, renamed Darwin-specific runetype.h to mac-runetype.h just like mac-ctype.h, alone with associated identifiers, to avoid conflicts.
  • Neither FreeBSD kernel nor C library provide *stat64, *statfs64 and fseeko64, avoid using them in such case.
  • Implements getting executable file path using sysctl(3), in addition to the Linux-specific /proc/self/exe.
  • Handles some differences in pthread-related macros between GNU and FreeBSD.
  • qsort_r(3) has different prototype between GNU and FreeBSD, handled it accordingly.
  • Function MachOLoader::loadSegments(const MachO &, intptr *, intptr *) contains a bug where it calls mmap(2) with MAP_ANON but 0 as fd, this is invalid, as kindly pointed out by FreeBSD kernel by a EINVAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants