mirror of
https://github.com/git/git.git
synced 2024-11-29 21:15:15 +08:00
18a4f6be6b
On various BSD's, fileno(fp) is implemented as a macro that directly accesses the fields in the FILE * object, which breaks a function that accepts a "void *fp" parameter and calls fileno(fp) and expect it to work. Work it around by adding a compile-time knob FILENO_IS_A_MACRO that inserts a real helper function in the middle of the callchain. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 lines
110 B
C
8 lines
110 B
C
#define COMPAT_CODE
|
|
#include "../git-compat-util.h"
|
|
|
|
int git_fileno(FILE *stream)
|
|
{
|
|
return fileno(stream);
|
|
}
|