Ticket #51524: patch-src-snowleopard-MachOYAML.diff

File patch-src-snowleopard-MachOYAML.diff, 456 bytes (added by kenneth.f.cunningham@…, 8 years ago)
  • lib/ObjectYAML/MachOYAML.cpp

    old new  
    1717
    1818#include <string.h> // For memcpy, memset and strnlen.
    1919
     20
     21static size_t
     22strnlen(const char *s, size_t maxlen)
     23{
     24        size_t len;
     25
     26        for (len = 0; len < maxlen; len++, s++) {
     27                if (!*s)
     28                        break;
     29        }
     30        return (len);
     31}
     32
     33
     34
    2035namespace llvm {
    2136
    2237MachOYAML::LoadCommand::~LoadCommand() {}