[csw-devel] SF.net SVN: gar:[21089] csw/mgar/pkg/dconf/trunk

slowfranklin at users.sourceforge.net slowfranklin at users.sourceforge.net
Wed May 15 11:25:16 CEST 2013


Revision: 21089
          http://gar.svn.sourceforge.net/gar/?rev=21089&view=rev
Author:   slowfranklin
Date:     2013-05-15 09:25:16 +0000 (Wed, 15 May 2013)
Log Message:
-----------
dconf/trunk: Fix mkdtemp patch for Solaris 11

Modified Paths:
--------------
    csw/mgar/pkg/dconf/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/dconf/trunk/files/0006-mkdtemp-replacement.patch

Modified: csw/mgar/pkg/dconf/trunk/Makefile
===================================================================
--- csw/mgar/pkg/dconf/trunk/Makefile	2013-05-15 08:03:55 UTC (rev 21088)
+++ csw/mgar/pkg/dconf/trunk/Makefile	2013-05-15 09:25:16 UTC (rev 21089)
@@ -92,11 +92,11 @@
 RUNTIME_DEP_PKGS_CSWdconf += CSWlibdconf0
 # PKGFILES is catchall
 
-PATCHFILES += 0000-Add-mkdtemp-replacement-function.patch
 PATCHFILES += 0001-Use-statvfs-for-checking-filesystem-type.patch
 PATCHFILES += 0002-Remove-linker-flags-remove-c89-request.patch
 PATCHFILES += 0003-Add-gio-includes.patch
 PATCHFILES += 0000-Replace-posix_fallocate-with-ftruncate.patch
+PATCHFILES += 0006-mkdtemp-replacement.patch
 
 CONFIGURE_ARGS = $(DIRPATHS)
 # package must be compiled in C99 mode; add __EXTENSIONS__ so the headers expose

Added: csw/mgar/pkg/dconf/trunk/files/0006-mkdtemp-replacement.patch
===================================================================
--- csw/mgar/pkg/dconf/trunk/files/0006-mkdtemp-replacement.patch	                        (rev 0)
+++ csw/mgar/pkg/dconf/trunk/files/0006-mkdtemp-replacement.patch	2013-05-15 09:25:16 UTC (rev 21089)
@@ -0,0 +1,43 @@
+From d31ada964044649ebcfce90b46e9fa46cb98e16d Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <sloowfranklin at gmail.com>
+Date: Wed, 15 May 2013 11:21:40 +0200
+Subject: [PATCH] mkdtemp() replacement
+
+---
+ service/dconf-state.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/service/dconf-state.c b/service/dconf-state.c
+index 0ed156e..31244b0 100644
+--- a/service/dconf-state.c
++++ b/service/dconf-state.c
+@@ -7,6 +7,17 @@
+ #include <stdio.h>
+ #include <errno.h>
+ 
++#include <sys/types.h>
++#include <sys/stat.h>
++
++static char *
++my_mkdtemp(char *template)
++{
++  if (!mktemp(template) || mkdir(template, 0700))
++    return NULL;
++  return template;
++}
++
+ static void
+ dconf_state_init_session (DConfState *state)
+ {
+@@ -59,7 +70,7 @@ dconf_state_init_session (DConfState *state)
+ 
+       shmdir = g_build_filename (tmpdir, "dconf.XXXXXX", NULL);
+ 
+-      if ((state->shm_dir = mkdtemp (shmdir)) == NULL)
++      if ((state->shm_dir = my_mkdtemp (shmdir)) == NULL)
+         g_error ("Can not create reasonable shm directory");
+     }
+ }
+-- 
+1.8.1.4
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list