lib/posix: SPARC newlib has unsigned short mode_t
lib/posix: SPARC newlib has unsigned short mode_t

This commit eliminates a compilation error by passing int to va_arg
rather than mode_t on SPARC.

Newlib sys/_types.h defines mode_t for SPARC as:
  typedef unsigned short __mode_t;

GCC 10.2.0 gave the following error message and suggested solution:

mqueue.c: In function 'mq_open':
mqueue.c:61:21: error: 'mode_t' {aka 'short unsigned int'} is promoted
 to 'int' when passed through '...' [-Werror]
   61 |   mode = va_arg(va, mode_t);
      |                     ^
mqueue.c:61:21: note: (so you should pass 'int' not 'mode_t' {aka 'short
unsigned int'} to 'va_arg')

Signed-off-by: Martin Åberg <37424e7fbe3f8590d57db5ed6ae5b8866742b6be@gaisler.com>

galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,Vudentz/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,nashif/zephyr,nashif/zephyr,nashif/zephyr,Vudentz/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr