Menu

#27 Compilation fails when OS does not provide strndup

None
closed
None
1
2024-09-15
2017-01-05
No

Compilation of dia2code 0.8.8 fails on Mac OS X 10.6 (and presumably earlier) with:

Undefined symbols:
  "_strndup", referenced from:
      _find_diaoid in dia2code-dia2code.o
      _sourceblock_new in dia2code-source_parser.o
      _source_parse in dia2code-source_parser.o
      _source_preserve in dia2code-source_parser.o
ld: symbol(s) not found

strndup was not in OS X until version 10.7. Could you add a compatibility implementation of strndup, or avoid using strndup?

Discussion

  • Oliver Kellogg

    Oliver Kellogg - 2017-01-05
    • status: open --> accepted
    • assigned_to: Oliver Kellogg
    • Group: -->
     
  • Oliver Kellogg

    Oliver Kellogg - 2017-01-05

    I coded a strndup() emulation; could you try out the git master?
    Thanks.

     
  • Oliver Kellogg

    Oliver Kellogg - 2024-09-15
    • status: accepted --> closed
     

Log in to post a comment.