public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Tobi <listaccount@e-tobi.net>
To: linux-media@vger.kernel.org
Subject: Userspace issue with DVB driver includes
Date: Thu, 09 Apr 2009 09:17:20 +0200	[thread overview]
Message-ID: <49DDA100.1030205@e-tobi.net> (raw)

Hello!

I think it was the change from asm/types.h to linux/types.h:

-#include <asm/types.h>
+#include <linux/types.h>

...which somehow broke the VDR build with recent DVB driver releases (see
snippet A below).

The common workaround/solution to this seems to be to add a
"-D__KERNEL_STRICT_NAMES".

But this feels wrong to me.

Reordering the includes and making sure <sys/*> is included before
<linux/*> solves this issue too.

But ideally the include order shouldn't matter at all.

So my question is: How to deal with this? What's the recommended way for
userspace applications to include linux/dvb headers?

Here's a small example, that fails to compile with 2.6.29:

// #include <sys/types.h>
// #define __KERNEL_STRICT_NAMES

#include <linux/dvb/frontend.h>
#include <linux/dvb/video.h>

int main()
{
    return 0;
}

Two workarounds to this problem are to define __KERNEL_STRICT_NAMES or
including <sys/*> before the linux/dvb includes.

Any comments, suggestions?

Please see also:

http://www.linuxtv.org/pipermail/linux-dvb/2009-March/031934.html

bye,

Tobias

--- snippet A ---

In file included from /usr/include/netinet/in.h:24,
                 from /usr/include/arpa/inet.h:23,
                 from config.h:13,
                 from channels.h:13,
                 from device.h:13,
                 from dvbdevice.h:15,
                 from dvbdevice.c:10:
/usr/include/stdint.h:41: error: conflicting declaration 'typedef long int
int64_t'
/usr/include/linux/types.h:98: error: 'int64_t' has a previous declaration
as 'typedef __s64 int64_t'
/usr/include/stdint.h:56: error: conflicting declaration 'typedef long
unsigned int uint64_t'
/usr/include/linux/types.h:96: error: 'uint64_t' has a previous
declaration as 'typedef __u64 uint64_t'

             reply	other threads:[~2009-04-09  7:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09  7:17 Tobi [this message]
2009-04-09 10:45 ` Userspace issue with DVB driver includes Mauro Carvalho Chehab
2009-04-09 16:32   ` Tobi
2009-04-09 17:34     ` Mauro Carvalho Chehab
2009-04-09 17:56       ` Tobi
2009-04-09 21:53       ` Tobi
2009-04-09 17:37     ` Tobi

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=49DDA100.1030205@e-tobi.net \
    --to=listaccount@e-tobi.net \
    --cc=linux-media@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox