Michael, Thanks for you response. I used the -E -dD switch on both the Ubuntu and Debian distribution to compare. On the Debian the macro is being expanded as expected. On the Ubuntu the macro doesn't get expanded at all. My understanding is that gcc first looks under /usr/local/include and then /usr/include for header files. On the Debian the macro definition is defined under /usr/include as expected. On the Ubuntu it is not defined in either place. However, when I built the new kernel I also built the new header files (which do include the macro definitions). I can invoke the compiler with the include path as: gcc -I /usr/src/linux-headers-2.6.19.2-research/include msg_client.c -o msg_client and I still get the same error message. When I use the -I -E -dD switches together I notice the output file contains the kernel #defines as expected. I still cannot determine why the macro doesn't expand even though it appears to have access to the definition. In the meantime, I have been able to use the syscall() function instead of the macro with success. Thanks for your time, Ryan
It's difficult to tell what the real problem is when looking at macros. You need to look at the code after macros have been expanded. Execute "gcc msg_client.c -E -dD -o msg_client.i" and take a look at what the _syscall2 macro generates. -- Michael Eager eager@xxxxxxxxxxxx 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077