]> Git Repo - qemu.git/blobdiff - os-win32.c
Make ARP replies at least 64 bytes long
[qemu.git] / os-win32.c
index d98fd77c12b04107383e10a33d73ef10897402bc..dd46bf459db4a150d2866468fa2c9bc1adb8a885 100644 (file)
 #include "sysemu.h"
 #include "qemu-options.h"
 
+/***********************************************************/
+/* Functions missing in mingw */
+
+int setenv(const char *name, const char *value, int overwrite)
+{
+    int result = 0;
+    if (overwrite || !getenv(name)) {
+        size_t length = strlen(name) + strlen(value) + 2;
+        char *string = qemu_malloc(length);
+        snprintf(string, length, "%s=%s", name, value);
+        result = putenv(string);
+    }
+    return result;
+}
+
 /***********************************************************/
 /* Polling handling */
 
This page took 0.024558 seconds and 4 git commands to generate.