Changeset 3043


Ignore:
Timestamp:
Oct 7, 2012, 9:44:36 PM (7 years ago)
Author:
bruno
Message:
  • Add support for missing mkdtemp such as Red Hat 6.2
Location:
branches/3.0/mondo/src/common
Files:
2 edited

Legend:

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

    r2989 r3043  
    1515#include "libmondo-tools-EXT.h"
    1616#include "libmondo-string-EXT.h"
     17#include "libmondo-fork-EXT.h"
    1718#include "lib-common-externs.h"
    1819#include "libmondo-raid.h"
  • 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.