patch-libblkid_src_save_c 572 B

1234567891011121314
  1. --- util-linux-2.23.2.orig/libblkid/src/save.c 2013-07-30 10:39:26.000000000 +0200
  2. +++ util-linux-2.23.2/libblkid/src/save.c 2013-08-14 11:59:06.000000000 +0200
  3. @@ -110,7 +110,11 @@ int blkid_flush_cache(blkid_cache cache)
  4. tmp = malloc(strlen(filename) + 8);
  5. if (tmp) {
  6. sprintf(tmp, "%s-XXXXXX", filename);
  7. +#if defined(__GLIBC__) && !defined(__UCLIBC__)
  8. fd = mkostemp(tmp, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);
  9. +#else
  10. + fd = mkstemp(tmp);
  11. +#endif
  12. if (fd >= 0) {
  13. if (fchmod(fd, 0644) != 0)
  14. DBG(SAVE, blkid_debug("%s: fchmod failed", filename));