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

File patch-src-snowleopard-macho2yaml.diff, 416 bytes (added by kenneth.f.cunningham@…, 8 years ago)
  • tools/obj2yaml/macho2yaml.cpp

    old new  
    1515
    1616#include <string.h> // for memcpy
    1717
     18static size_t
     19strnlen(const char *s, size_t maxlen)
     20{
     21        size_t len;
     22
     23        for (len = 0; len < maxlen; len++, s++) {
     24                if (!*s)
     25                        break;
     26        }
     27        return (len);
     28}
     29
     30
    1831using namespace llvm;
    1932
    2033class MachODumper {