Re: Kernel Compilation problem - Partially Solved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Narasimhamurthy Giridhar (giridhar@cs.clemson.edu) wrote:
> 
> Unfortunately, thats just a typo *only* in the mail and not in the code I
> have changed.
> But I did get it working. I am just not sure if its the right way of doing
> it. I changed /usr/include/asm/unistd.h by adding #define __NR_mycall 191
> to it . I have made similar change in /usr/src/linux/include/asm/unistd.h
> also.
> 
> Is this good, safe etc. ???

No.  Like I mentioned last time, just manually #define __NR_mycall 191
in you user program.  You should _not_ alter your systems header files,
it's a Bad Idea (TM).  The only thing you need the header file for is the
_syscall1 expansion (try gcc -E and you'll see what I mean).  And the
__NR_mycall macro is needed just to ensure you call into the kernel
with the right syscall number (so it can jump to the right entry in the
syscall table).  The change to asm/unistd.h is, of course, necessary in
the kernel source.

hope that clarifies,
-chris
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux