zip: fix bug
[src/app-framework-main.git] / src / wgtpkg-zip.c
index 8168fe7..a810e50 100644 (file)
@@ -16,7 +16,7 @@
  limitations under the License.
 */
 
-#define _BSD_SOURCE /* see readdir */
+#define _DEFAULT_SOURCE
 
 #include <limits.h>
 #include <sys/types.h>
@@ -353,6 +353,7 @@ int zwrite(const char *zipfile)
 #else
 
 #include <sys/wait.h>
+#include <stdlib.h>
 
 extern char **environ;
 
@@ -414,8 +415,8 @@ int zwrite(const char *zipfile)
        args[0] = "zip";
        args[1] = "-q";
        args[2] = "-r";
-       args[3] = workdir;
-       args[4] = zipfile;
+       args[3] = zipfile;
+       args[4] = workdir;
        args[5] = NULL;
 
        return zrun(PATH_TO_ZIP, args);