From: Sinan Akpolat <sinan@linkas.com.tr>
To: netdev@vger.kernel.org
Subject: A question about include/linux/socket.h
Date: Wed, 28 Aug 2013 16:45:29 +0300 [thread overview]
Message-ID: <521DFEF9.5040701@linkas.com.tr> (raw)
Hi,
I am writing CAN bus userspace code and I get a compiler error stating
"sa_family_t is not defined" for "include/linux/can.h". sa_family_t is
defined in include/linux/socket.h but it is not carried to userspace
kernel headers.
When I searched about it I saw that a similar problem in
include/linux/netlink.h and include/linux/socket.h is fixed by the patch:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/include?id=6602a4baf4d1a73cc4685a39ef859e1c5ddf654c.
I also read about UAPI but I can't use newer kernels.
I searched the kernel git repo but couldn't find a similar patch for
can.h. When you search for "sa_family_t" in include/linux directory you
can see it is used in more than 10 files and I guess none of those files
will compile since they won't be able to find typedef sa_family_t (just
like can.h).
So my question is:
- Does anyone remember a patch fixing this issue?
- Should the typedef sa_family_t moved to userspace kernel headers? Or
should structs containing sa_family_t type variables moved away from
user space?
I have been using the file manually defining sa_family_t but I wanted to
ask. I am using kernel version 2.6.37 but I guess can.h file was
unchanged until 3.5.
Thanks
next reply other threads:[~2013-08-28 13:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 13:45 Sinan Akpolat [this message]
2013-08-28 14:27 ` A question about include/linux/socket.h Ben Hutchings
2013-08-28 14:35 ` Sinan Akpolat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521DFEF9.5040701@linkas.com.tr \
--to=sinan@linkas.com.tr \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.