Skip to content

Commit 133c6bb

Browse files
authored
Fix linking gethostname on ps2. (#454)
1 parent 882fdb0 commit 133c6bb

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/compat.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@ struct MinList __filelist = { (struct MinNode *) &__filelist.mlh_Tail, NULL, (st
120120

121121
#define login_num ENXIO
122122

123-
#ifdef _IOP
124-
#define getpid_num() 27
125-
126-
static unsigned long int next = 1;
127-
128123
int gethostname(char *name, size_t len)
129124
{
130125
strncpy(name, "PS2", len);
131126
return 0;
132127
}
133128

129+
130+
#ifdef _IOP
131+
#define getpid_num() 27
132+
133+
static unsigned long int next = 1;
134134
time_t time(time_t *tloc)
135135
{
136136
u32 sec, usec;

lib/compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ typedef size_t ssize_t;
459459
#endif
460460

461461
long long int be64toh(long long int x);
462+
int gethostname(char *name, size_t len);
462463
#ifdef _IOP
463464
char *strdup(const char *s);
464465

465-
int gethostname(char *name, size_t len);
466466
int random(void);
467467
void srandom(unsigned int seed);
468468
time_t time(time_t *tloc);

0 commit comments

Comments
 (0)