Alien-libmaxminddb

 view release on metacpan or  search on metacpan

maxminddb/src/maxminddb.c  view on Meta::CPAN

438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
    }
 
#if defined(FD_CLOEXEC) && !defined(O_CLOEXEC)
    int fd_flags = fcntl(fd, F_GETFD);
    if (fd_flags >= 0) {
        fcntl(fd, F_SETFD, fd_flags | FD_CLOEXEC);
    }
#endif
 
    struct stat s;
    if (fstat(fd, &s)) {
        status = MMDB_FILE_OPEN_ERROR;
        goto cleanup;
    }
 
    off_t size = s.st_size;
    if (size < 0 || size > SSIZE_MAX) {
        status = MMDB_OUT_OF_MEMORY_ERROR;
        goto cleanup;
    }



( run in 0.716 second using v1.01-cache-2.11-cpan-49f99fa48dc )