1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

Respect CC and CFLAGS, and fix a bug involving use of uninitialized

memory after malloc (causes coredump on -current)
This commit is contained in:
Kris Kennaway 2002-10-19 22:29:07 +00:00
parent 6aee96b6e7
commit 3065608291
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=68387
3 changed files with 22 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= opensched
PORTVERSION= 0.1.0
PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= http://www.m-tech.ab.ca/download/sched/
DISTNAME= ${PORTNAME}-${PORTVERSION}

View File

@ -0,0 +1,11 @@
--- src/Makefile.orig Tue Oct 26 01:41:45 1999
+++ src/Makefile Sat Oct 19 15:13:56 2002
@@ -1,6 +1,6 @@
-CFLAGS=-Wall -g
+CFLAGS+=-Wall -g
LIBS=-lm
-CC=gcc
+CC?=cc
CDEPEND = $(CC) -M
CDEPENDFLAGS =

View File

@ -0,0 +1,10 @@
--- src/loadfile.c.orig Sat Oct 19 15:29:13 2002
+++ src/loadfile.c Sat Oct 19 15:28:40 2002
@@ -268,6 +268,7 @@
t = (TASK*)malloc(sizeof(TASK));
if ( t == NULL )
Error("Can't malloc task in AddTask()");
+ memset(t, 0, sizeof(TASK));
t->id = strdup(id);
t->name = strdup(name);