File mpack-1.6.diff of Package mpack
diff -ubrN mpack-1.6/decode.c mpack-1.6-1/decode.c
--- mpack-1.6/decode.c 2003-07-21 16:47:54.000000000 -0400
+++ mpack-1.6-1/decode.c 2009-02-10 00:06:40.000000000 -0500
@@ -25,6 +25,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE. */
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
diff -ubrN mpack-1.6/encode.c mpack-1.6-1/encode.c
--- mpack-1.6/encode.c 2003-07-21 16:35:31.000000000 -0400
+++ mpack-1.6-1/encode.c 2009-02-09 23:46:19.000000000 -0500
@@ -22,6 +22,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff -ubrN mpack-1.6/magic.c mpack-1.6-1/magic.c
--- mpack-1.6/magic.c 2003-07-21 16:35:31.000000000 -0400
+++ mpack-1.6-1/magic.c 2009-02-09 23:47:27.000000000 -0500
@@ -23,6 +23,7 @@
* SOFTWARE.
*/
#include <stdio.h>
+#include <string.h>
/* Description of the various file formats and their magic numbers */
struct magic {
diff -ubrN mpack-1.6/part.c mpack-1.6-1/part.c
--- mpack-1.6/part.c 2003-07-21 16:35:31.000000000 -0400
+++ mpack-1.6-1/part.c 2009-02-10 00:08:40.000000000 -0500
@@ -26,6 +26,7 @@
* SOFTWARE.
*/
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff -ubrN mpack-1.6/unixos.c mpack-1.6-1/unixos.c
--- mpack-1.6/unixos.c 2003-07-21 16:54:05.000000000 -0400
+++ mpack-1.6-1/unixos.c 2009-02-09 23:54:25.000000000 -0500
@@ -22,6 +22,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
+#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
@@ -38,9 +39,11 @@
#define MAXHOSTNAMELEN 64
#endif
+/*
extern int errno;
extern char *malloc();
extern char *getenv();
+*/
int overwrite_files = 0;
int didchat;
diff -ubrN mpack-1.6/unixpk.c mpack-1.6-1/unixpk.c
--- mpack-1.6/unixpk.c 2003-07-21 16:50:41.000000000 -0400
+++ mpack-1.6-1/unixpk.c 2009-02-10 00:03:42.000000000 -0500
@@ -22,16 +22,18 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "common.h"
+#include <unistd.h>
#include "version.h"
#include "xmalloc.h"
#define MAXADDRESS 100
-extern char *getenv();
+/* extern char *getenv(); */
extern int errno;
extern int optind;
@@ -167,7 +169,7 @@
strcpy(fnamebuf, "/usr/tmp");
}
strcat(fnamebuf, "/mpackXXXXXX");
- mktemp(fnamebuf);
+ mkstemp(fnamebuf);
outfname = strsave(fnamebuf);
}
diff -ubrN mpack-1.6/unixunpk.c mpack-1.6-1/unixunpk.c
--- mpack-1.6/unixunpk.c 2003-07-21 16:51:55.000000000 -0400
+++ mpack-1.6-1/unixunpk.c 2009-02-09 23:56:04.000000000 -0500
@@ -22,6 +22,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
+#include <stdlib.h>
#include <stdio.h>
#include "version.h"
#include "part.h"
diff -ubrN mpack-1.6/xmalloc.c mpack-1.6-1/xmalloc.c
--- mpack-1.6/xmalloc.c 2003-07-21 16:35:31.000000000 -0400
+++ mpack-1.6-1/xmalloc.c 2009-02-09 23:59:19.000000000 -0500
@@ -22,9 +22,10 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-extern char *malloc(), *realloc();
+/* extern char *malloc(), *realloc(); */
char *xmalloc (int size)
{