Ignore:
Timestamp:
Oct 7, 2012, 9:44:36 PM (12 years ago)
Author:
Bruno Cornec
Message:
  • Add support for missing mkdtemp such as Red Hat 6.2
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/common/libmondo-tools.c

    r3042 r3043  
    728728}
    729729
     730/*  From busybox under GPLv2 */
     731#ifndef HAVE_MKDTEMP
     732/* This is now actually part of POSIX.1, but was only added in 2008 */
     733char* mkdtemp(char *template)
     734{
     735    if (mktemp(template) == NULL || mkdir(template, 0700) != 0)
     736        return NULL;
     737    return template;
     738}
     739#endif
     740
    730741void setup_tmpdir(char *path) {
    731742
Note: See TracChangeset for help on using the changeset viewer.