Include stdlib.h, better than conflicting/missing decls

This commit is contained in:
jca 2017-05-04 13:14:02 +00:00
parent 33020b522c
commit 166da6d774

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-xprop_dsimple_c,v 1.1 2017/05/04 13:14:02 jca Exp $
--- xprop/dsimple.c.orig
+++ xprop/dsimple.c
@@ -32,6 +32,7 @@ from The Open Group.
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
#include <stdio.h>
+#include <stdlib.h>
/*
* Other_stuff.h: Definitions of routines in other_stuff.
*
@@ -69,7 +70,7 @@ extern int screen;
char *Malloc(size)
unsigned size;
{
- char *data, *malloc();
+ char *data;
if (!(data = malloc(size)))
Fatal_Error("Out of memory!");
@@ -85,7 +86,7 @@ char *Realloc(ptr, size)
char *ptr;
int size;
{
- char *new_ptr, *realloc();
+ char *new_ptr;
if (!ptr)
return(Malloc(size));