Skip to content

Commit 42aa3fa

Browse files
committed
Fix 'implicit declaration of function' error with gcc 15.1.0
modified: compat/os2-posix.h modified: compat/os2.h modified: strbuf.c
1 parent e47bdfc commit 42aa3fa

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

compat/os2-posix.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ struct pollfd {
3131
#define POLLNVAL 0x0020 /* not supported */
3232
#endif
3333

34+
extern char * wrapped_getenv_for_os2 (const char *);
35+
extern struct passwd * wrapped_getpwuid_for_klibc (uid_t);
36+
extern int wrapped_unlink_for_dosish_system (const char *);
37+
38+
extern int wrapped_poll_for_os2 (struct pollfd *, nfds_t, int);
39+
extern int wrapped_pipe_for_os2 (int *);
40+
41+
extern int wrapped_execl_for_os2 (const char *, const char *, ...);
42+
extern int wrapped_execlp_for_os2 (const char *, const char *, ...);
43+
extern int wrapped_execv_for_os2 (const char *, char **);
44+
extern int wrapped_execvp_for_os2 (const char *, char **);
45+
46+
extern ssize_t git_os2_read (int, void *, size_t);
47+
extern ssize_t git_os2_write (int, const void *, size_t);
48+
49+
extern const char *git_os2_runtime_prefix (void);
50+
3451
#ifndef BUILDING_COMPAT_OS2
3552
# ifdef __EMX__
3653
# define chdir(d) _chdir2(d)

compat/os2.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
#include "os2-posix.h"
22

3-
extern struct passwd * wrapped_getpwuid_for_klibc (uid_t);
4-
extern int wrapped_unlink_for_dosish_system (const char *);
5-
extern char * wrapped_getenv_for_os2 (const char *);
6-
7-
extern int wrapped_poll_for_os2 (struct pollfd *, nfds_t, int);
8-
extern int wrapped_pipe_for_os2 (int *);
9-
10-
extern int wrapped_execl_for_os2 (const char *, const char *, ...);
11-
extern int wrapped_execlp_for_os2 (const char *, const char *, ...);
12-
extern int wrapped_execv_for_os2 (const char *, char **);
13-
extern int wrapped_execvp_for_os2 (const char *, char **);
14-
15-
extern const char *git_os2_runtime_prefix (void);
163
extern const char *git_os2_default_template_dir (void);
174
extern const char *git_os2_default_html_path (void);
185
extern const char *git_os2_default_info_path (void);
196
extern const char *git_os2_default_man_path (void);
207

21-
extern ssize_t git_os2_read (int, void *, size_t);
22-
extern ssize_t git_os2_write (int, const void *, size_t);
23-
248
#undef DEFAULT_GIT_TEMPLATE_DIR
259
#define DEFAULT_GIT_TEMPLATE_DIR (git_os2_default_template_dir ())
2610
#undef GIT_HTML_PATH

strbuf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#include "string-list.h"
88
#include "utf8.h"
99
#include "date.h"
10+
#ifdef __OS2__
11+
#include <io.h>
12+
#endif
1013

1114
int starts_with(const char *str, const char *prefix)
1215
{

0 commit comments

Comments
 (0)