mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
textproc/xml-format: correct errno usage
extern int errno; is incorrect these days. Include <errno.h> for the correct behaviour. This fixes the build on some configurations. Approved by: portmgr (build fix blanket)
This commit is contained in:
parent
3064c062d9
commit
e56c6c0880
3 changed files with 35 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
PORTNAME= xml-format
|
PORTNAME= xml-format
|
||||||
DISTVERSION= 0.2.0-3
|
DISTVERSION= 0.2.0-3
|
||||||
DISTVERSIONSUFFIX= -g4448d89
|
DISTVERSIONSUFFIX= -g4448d89
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= textproc
|
CATEGORIES= textproc
|
||||||
|
|
||||||
MAINTAINER= jwb@FreeBSD.org
|
MAINTAINER= jwb@FreeBSD.org
|
||||||
|
|
16
textproc/xml-format/files/patch-tag-list.c
Normal file
16
textproc/xml-format/files/patch-tag-list.c
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
--- tag-list.c.orig 2025-02-05 15:23:28 UTC
|
||||||
|
+++ tag-list.c
|
||||||
|
@@ -1,3 +1,4 @@
|
||||||
|
+#include <errno.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <string.h>
|
||||||
|
@@ -80,8 +81,6 @@ void tag_list_error_check(int list_size, const char
|
||||||
|
void tag_list_error_check(int list_size, const char *path)
|
||||||
|
|
||||||
|
{
|
||||||
|
- extern int errno;
|
||||||
|
-
|
||||||
|
if ( list_size == -1 )
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Unable to read %s: %s\n", path, strerror(errno));
|
18
textproc/xml-format/files/patch-xml-format.c
Normal file
18
textproc/xml-format/files/patch-xml-format.c
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
--- xml-format.c.orig 2025-02-05 15:23:48 UTC
|
||||||
|
+++ xml-format.c
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
* 2013-02-09 Jason Bacon Begin
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
+#include <errno.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
@@ -69,7 +70,6 @@ int xml_format(const char *filename)
|
||||||
|
buff[COPY_BUFF_SIZE+1],
|
||||||
|
*subdir;
|
||||||
|
size_t bytes;
|
||||||
|
- extern int errno;
|
||||||
|
tag_list_t tags;
|
||||||
|
|
||||||
|
if ( ( subdir = strrchr(filename, '.')) == NULL )
|
Loading…
Add table
Reference in a new issue