On 7/10/2010 5:38 PM, J. L. wrote:
On Wed, Oct 6, 2010 at 11:29 PM, Alex Gibson <alxx@alexthegeek.com> wrote:
 On 7/10/2010 3:48 PM, J. L. wrote:

          
root@overo:~# uname -a
Linux overo 2.6.34 #1 Thu Oct 7 13:29:22 EST 2010 armv7l GNU/Linux

root@overo:/usr/include/sys# ls
acct.h      inotify.h      poll.h      signal.h     sysmacros.h    unistd.h
acl.h       io.h           prctl.h     signalfd.h   termios.h      user.h
bitypes.h   ioctl.h        procfs.h    socket.h     time.h         ustat.h
cdefs.h     ipc.h          profil.h    socketvar.h  timeb.h        utsname.h
dir.h       kd.h           ptrace.h    soundcard.h  timerfd.h      vfs.h
elf.h       kdaemon.h      queue.h     stat.h       times.h        vlimit.h
epoll.h     klog.h         quota.h     statfs.h     timex.h        vt.h
errno.h     mman.h         raw.h       statvfs.h    ttychars.h     vtimes.h
eventfd.h   mount.h        reboot.h    stropts.h    ttydefaults.h  wait.h
fcntl.h     msg.h          resource.h  swap.h       types.h        xattr.h
file.h      mtio.h         select.h    syscall.h    ucontext.h
fsuid.h     param.h        sem.h       sysctl.h     uio.h
gmon.h      pci.h          sendfile.h  sysinfo.h    ultrasound.h
gmon_out.h  personality.h  shm.h       syslog.h     un.h

root@overo:/usr/include/net# ls
ethernet.h  if_arp.h     if_ppp.h     if_slip.h   ppp_defs.h
if.h        if_packet.h  if_shaper.h  ppp-comp.h  route.h
root@overo:/usr/include/net#

If you have a program or example I can give it a try building it if you
want ?


Alex




The only difference is my kernel was built on the 30th of Sep but I
list basically the same files as you but what I listed above does not
show up in your listings as well.

While yes some that it cant find are listed well 2 actually thats it.
The rest do not show up and this is not even a complete list of what
headers I have run across it not being able to find.
sys/bufmod.h
sys/dlpi.h
sys/dlpihdr.h
net/raw.h    ----- was put in place by me and cant find it
sys/dlpi_ext.h
sys/mib.h
sys/ndd_var.h
sys/sockio.h
net/if_var.h
net/if_dl.h
net/pfilt.h
net/pvar.h
net/radix.h
netinet/in_var.h
net/if_tun.h
netinet/ip_fw.h
linux/ip_fw.h
linux/ip_fwchains.h
linux/netfilter_ipv4/ipchains_chore.h
ip_compat.h
netinet/ip_compat.h
ip_fil.h
_do_prnt
vfork.h
asnprintf
strlcat
strlcpy
net/route.h  --- on system from standard build and install but cant find it

A bunch of the headers I can find in the kernel source itself but I
did not have luck just copying it to the location and having it work.
But there is also some headers I can not even find in the kernel
source.

If you like I can paste the exact things you did but would be
duplicated just the kernel date is the only difference. At least
subversion is finally building for me so step forward today.

Thanks for your help and input so far.

?? Not sure
I have exactly the same headers as listed above  in /usr/include/net and
/usr/include/sys   on my fedora13 box and installed on multiple gumstix.
I am using python for most of the network programing, but most c and c++
programs I've tried to build have built without problems.

Don't have the ipchains headers on my fedora 13 box at all, same with
most of those you list.

Wouldn't you be better off putting any of your own headers or
non-default headers in /usr/local/include ?
Not sure this is all one crazy learning experience for me. Is that the
standard way to put headers in? If so and say the 2 headers I need to
install are /net/raw.h and sys/sockio.h do I just put them both as so?
/usr/local/include/net/raw.h and /usr/local/include/sys/sockio.h   ?
would that be it? Or would I need to do more than just putting them in
the file system like that? Sorry if this is all really basic linux
questions but this is the furthest I have ever gotten into linux and
just trying to figure all this out. Thanks again for your time and
help so far.

JL


http://tldp.org/guides.html   Can find most manuals for linux there.


Its better to keep your own files in different location to the system files/headers.
Avoids overwriting system headers and makes it easier to update and back things up.

man hier
and
http://www.pathname.com/fhs/pub/fhs-2.3.html
http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html

"The original idea behind '/usr/local' was to have a separate ('local') '/usr' directory on every machine besides '/usr', which might be just mounted read-only from somewhere else. It copies the structure of '/usr'. These days, '/usr/local' is widely regarded as a good place in which to keep self-compiled or third-party programs. The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr. Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr."


For your own use its up to you. Depends if you need to or want to share your code with others.

At least put them in a separate folder

e.g
/usr/include/appName/raw.h
/usr/include/appName/sockio.h

I'd do
/usr/local/include/appName (or library name)
/usr/local/include/appName/raw.h
/usr/local/include/appName/sockio.h

Then just add that to your include path
-I /usr/local/include/appName/


Also does it need a separate vfork.h ?
Can't use the vfork in /usr/include/unistd.h   ?

route.h is in /usr/include/net

Have you got the include path set properly in the make file ?


Alex



UTS CRICOS Provider Code: 00099F
DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views the University of Technology, Sydney. Before opening any attachments, please check them for viruses and defects.