1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

- Fix comms/nec2c for large allocations

PR:		ports/168448
Submitted by:	doconnor@gsoft.com.au
This commit is contained in:
Diane Bruce 2012-06-05 19:23:38 +00:00
parent 9443714572
commit 1534767a37
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=298510
3 changed files with 34 additions and 0 deletions

View File

@ -10,6 +10,7 @@
PORTNAME= nec2c
PORTVERSION= .9
PORTREVISION= 1
CATEGORIES= comms hamradio
MASTER_SITES= http://ftp-mirror.internap.com/pub/FreeBSD/distfiles/nec2c/ \
http://ftp.cerias.purdue.edu/pub/os/FreeBSD/distfiles/nec2c/

View File

@ -0,0 +1,20 @@
--- misc.c.orig 2012-06-05 13:35:29.000000000 -0500
+++ misc.c 2012-06-05 13:36:34.000000000 -0500
@@ -192,7 +192,7 @@
/*** Memory allocation/freeing utils ***/
-void mem_alloc( void **ptr, int req )
+void mem_alloc( void **ptr, size_t req )
{
free_ptr( ptr );
*ptr = malloc( req );
@@ -203,7 +203,7 @@
/*------------------------------------------------------------------------*/
-void mem_realloc( void **ptr, int req )
+void mem_realloc( void **ptr, size_t req )
{
*ptr = realloc( *ptr, req );
if( *ptr == NULL )

View File

@ -0,0 +1,13 @@
--- nec2c.h.orig 2012-06-05 13:34:14.000000000 -0500
+++ nec2c.h 2012-06-05 13:34:45.000000000 -0500
@@ -201,8 +201,8 @@
void secnds(double *x);
int stop(int flag);
int load_line(char *buff, FILE *pfile);
-void mem_alloc( void **ptr, int req );
-void mem_realloc( void **ptr, int req );
+void mem_alloc( void **ptr, size_t req );
+void mem_realloc( void **ptr, size_t req );
void free_ptr( void **ptr );
/* somnec.c */
void somnec(double epr, double sig, double fmhz);