1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fix getdelim and getline having the wrong external linkage.

This commit is contained in:
Jonas 'Sortie' Termansen 2013-09-24 17:09:35 +02:00
parent 8a7a0db8c7
commit 8d2c585479
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
ssize_t getdelim(char** lineptr, size_t* n, int delim, FILE* fp)
extern "C" ssize_t getdelim(char** lineptr, size_t* n, int delim, FILE* fp)
{
if ( !lineptr || (*lineptr && !n) || !fp ) { errno = EINVAL; return -1; }
const size_t DEFAULT_BUFSIZE = 32UL;

View file

@ -24,7 +24,7 @@
#include <stdio.h>
ssize_t getline(char** lineptr, size_t* n, FILE* fp)
extern "C" ssize_t getline(char** lineptr, size_t* n, FILE* fp)
{
return getdelim(lineptr, n, '\n', fp);
}