Skip to content

Commit 04866df

Browse files
committed
ee_core: _strtoul returns u64 (gcc10 fix)
1 parent 9937e33 commit 04866df

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ee_core/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ifeq ($(PADEMU),1)
5353
EE_CFLAGS += -DPADEMU
5454
endif
5555

56-
EE_LIBS += -lkernel-nopatch
56+
EE_LIBS += -lkernel-nopatch -lgcc
5757

5858
$(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.c
5959
@mkdir -p $(EE_OBJS_DIR)

ee_core/include/util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int _toupper(int c);
2525
int _memcmp(const void *s1, const void *s2, unsigned int length);
2626
unsigned int _strtoui(const char *p);
2727
int _strtoi(const char *p);
28-
unsigned long int _strtoul(const char *p);
28+
u64 _strtoul(const char *p);
2929
void set_ipconfig(void);
3030
u32 *find_pattern_with_mask(u32 *buf, unsigned int bufsize, const u32 *pattern, const u32 *mask, unsigned int len);
3131
void CopyToIop(void *eedata, unsigned int size, void *iopptr);

ee_core/src/util.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,16 @@ int _strtoi(const char *p)
261261
}
262262

263263
/*----------------------------------------------------------------------------------------*/
264-
/* This function converts string to unsigned long integer. Stops on illegal characters. */
264+
/* This function converts string to u64. Stops on illegal characters. */
265265
/* Put here because including atoi rises the size of loader.elf by another kilobyte */
266266
/* and that causes some games to stop working. */
267267
/*----------------------------------------------------------------------------------------*/
268-
unsigned long int _strtoul(const char *p)
268+
u64 _strtoul(const char *p)
269269
{
270270
if (!p)
271271
return 0;
272272

273-
unsigned long int r = 0;
273+
u64 r = 0;
274274

275275
while (*p) {
276276
if ((*p < '0') || (*p > '9'))

0 commit comments

Comments
 (0)