diff options
Diffstat (limited to 'games-mud/kmuddy/files/kmuddy-1.0.1-tempnam.patch')
-rw-r--r-- | games-mud/kmuddy/files/kmuddy-1.0.1-tempnam.patch | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/games-mud/kmuddy/files/kmuddy-1.0.1-tempnam.patch b/games-mud/kmuddy/files/kmuddy-1.0.1-tempnam.patch deleted file mode 100644 index 0d2d3f45b862..000000000000 --- a/games-mud/kmuddy/files/kmuddy-1.0.1-tempnam.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/plugins/scripting/cunixsocket.cpp -+++ b/plugins/scripting/cunixsocket.cpp -@@ -40,12 +40,21 @@ - varlist = 0; - connected = false; - -- //first of all, we need a file name -- char *fname = tempnam ("/tmp", "km"); -- if (fname != 0) //only if it didn't fail -+ //22 = strlen(form) + strlen(/sock) + 1 -+ char form[]="/tmp/kmuddyXXXXXX", *dirname, sockname[22]; -+ dirname = mkdtemp(form); -+ -+ if (dirname != NULL) //only if it didn't fail - { -- name = fname; -- free (fname); -+ -+ strcpy(sockname, dirname); -+ strcat(dirname, "/sock"); -+ -+ name = dirname; -+ free (form); -+ free (dirname); -+ free (sockname); -+ - //now that we have the name, we create a socket and set some parameters - id = socket (PF_UNIX, SOCK_STREAM, 0); - sa.sun_family = AF_UNIX; |