Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/util/blocking.c

    r414 r988  
    2222*/
    2323
    24 #include "includes.h"
    25 #include "system/network.h"
     24#include "replace.h"
    2625#include "system/filesys.h"
    27 #include "system/locale.h"
    28 #undef malloc
    29 #undef strcasecmp
    30 #undef strncasecmp
    31 #undef strdup
    32 #undef realloc
     26#include "blocking.h"
    3327
    3428/**
     
    6155#undef FLAG_TO_SET
    6256}
     57
     58
     59_PUBLIC_ bool smb_set_close_on_exec(int fd)
     60{
     61#ifdef FD_CLOEXEC
     62        int val;
     63
     64        val = fcntl(fd, F_GETFD, 0);
     65        if (val >= 0) {
     66                val |= FD_CLOEXEC;
     67                val = fcntl(fd, F_SETFD, val);
     68                if (val != -1) {
     69                        return true;
     70                }
     71        }
     72#endif
     73        return false;
     74}
Note: See TracChangeset for help on using the changeset viewer.