Hey Guys,
I wanted to compile the newest ctrulib but I got some errors while compiling with "make".
how can I fix this?
I wanted to compile the newest ctrulib but I got some errors while compiling with "make".
Code:
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Init':
c:/devkitPro/libctru/source/synchronization.c:27:11: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
__ldrex(lock);
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
^
c:/devkitPro/libctru/source/synchronization.c:28:17: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
while (__strex(lock, 1));
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Lock':
c:/devkitPro/libctru/source/synchronization.c:37:17: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
val = __ldrex(lock);
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
^
c:/devkitPro/libctru/source/synchronization.c:41:16: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
if (__strex(lock, val-1))
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
^
c:/devkitPro/libctru/source/synchronization.c:51:19: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
val = __ldrex(lock);
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
^
c:/devkitPro/libctru/source/synchronization.c:58:21: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
} while (__strex(lock, -(val-1)));
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
^
c:/devkitPro/libctru/source/synchronization.c:61:19: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
} while (__strex(lock, -val));
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_TryLock':
c:/devkitPro/libctru/source/synchronization.c:69:17: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
val = __ldrex(lock);
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
^
c:/devkitPro/libctru/source/synchronization.c:75:19: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
} while (__strex(lock, -val));
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Unlock':
c:/devkitPro/libctru/source/synchronization.c:83:18: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
val = -__ldrex(lock);
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
^
c:/devkitPro/libctru/source/synchronization.c:84:17: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
while (__strex(lock, val));
^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Init':
c:/devkitPro/libctru/source/synchronization.c:93:22: error: request for member 'lock' in something not a structure or union
LightLock_Init(&lock->lock);
^
c:/devkitPro/libctru/source/synchronization.c:94:6: error: request for member 'thread_tag' in something not a structure or union
lock->thread_tag = 0;
^
c:/devkitPro/libctru/source/synchronization.c:95:6: error: request for member 'counter' in something not a structure or union
lock->counter = 0;
^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Lock':
c:/devkitPro/libctru/source/synchronization.c:101:10: error: request for member 'thread_tag' in something not a structure or union
if (lock->thread_tag != tag)
^
c:/devkitPro/libctru/source/synchronization.c:103:23: error: request for member 'lock' in something not a structure or union
LightLock_Lock(&lock->lock);
^
c:/devkitPro/libctru/source/synchronization.c:104:7: error: request for member 'thread_tag' in something not a structure or union
lock->thread_tag = tag;
^
c:/devkitPro/libctru/source/synchronization.c:106:6: error: request for member 'counter' in something not a structure or union
lock->counter ++;
^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_TryLock':
c:/devkitPro/libctru/source/synchronization.c:112:10: error: request for member 'thread_tag' in something not a structure or union
if (lock->thread_tag != tag)
^
c:/devkitPro/libctru/source/synchronization.c:114:30: error: request for member 'lock' in something not a structure or union
if (LightLock_TryLock(&lock->lock))
^
c:/devkitPro/libctru/source/synchronization.c:116:7: error: request for member 'thread_tag' in something not a structure or union
lock->thread_tag = tag;
^
c:/devkitPro/libctru/source/synchronization.c:118:6: error: request for member 'counter' in something not a structure or union
lock->counter ++;
^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Unlock':
c:/devkitPro/libctru/source/synchronization.c:124:13: error: request for member 'counter' in something not a structure or union
if (!--lock->counter)
^
c:/devkitPro/libctru/source/synchronization.c:126:7: error: request for member 'thread_tag' in something not a structure or union
lock->thread_tag = 0;
^
c:/devkitPro/libctru/source/synchronization.c:127:25: error: request for member 'lock' in something not a structure or union
LightLock_Unlock(&lock->lock);
^
cc1.exe: all warnings being treated as errors
make[1]: *** [synchronization.o] Error 1
make: *** [build] Error 2