0

I am trying to pass a pointer to a system call by passing a message with that call.

The pointer should be to an int[].

However the message definition expects a char pointer to be passed. How can I send an int pointer?

int pidarray[j];
m.m1_p1 = pidarray;

Is it possible to convert the pointer types?

calmcalmuncle
  • 143
  • 1
  • 2
  • 16
  • Are you thinking of [syscalls(2)](http://man7.org/linux/man-pages/man2/syscalls.2.html) or of the [system(3)](http://man7.org/linux/man-pages/man3/system.3.html) library function when mentioning "C System Calls"? Please edit your question to improve it. Perhaps tag it more precisely (with Linux, POSIX, ...) – Basile Starynkevitch Dec 03 '15 at 11:08

1 Answers1

1

Is it possible to convert the pointer types?

Yes this is possible. e.g.:

(char*) intPointer
Michiel Pater
  • 22,377
  • 5
  • 43
  • 57