Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 03-17-2013, 08:23 AM   #1
Registered: Apr 2010
Distribution: Slackware
Posts: 495

Rep: Reputation: 118Reputation: 118
what include am i missing for types like u_int8_t?

Tried to compile a package for cairo-dock-plugins-3.1.2 with an existing SlackBuild. It breaks like so

In file included from /usr/include/alsa/asoundlib.h:49:0,
                 from /tmp/SBo/cairo-dock-plugins-3.1.2/alsaMixer/src/applet-struct.h:23,
                 from /tmp/SBo/cairo-dock-plugins-3.1.2/alsaMixer/src/applet-init.c:20:
/usr/include/alsa/pcm.h:944:1: error: unknown type name u_int8_t
/usr/include/alsa/pcm.h:945:1: error: unknown type name u_int16_t
/usr/include/alsa/pcm.h:946:1: error: unknown type name u_int32_t
/usr/include/alsa/pcm.h:947:1: error: unknown type name u_int64_t
/usr/include/alsa/pcm.h:1052:1: error: unknown type name int16_t
I grepped /usr/include and found thoses types are used in a number of headers, but i couldn't find a definition. What am I missing?

I'm on slackware64-current and kernel 3.8.3.
Old 03-17-2013, 08:37 AM   #2
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 56
Googling for 'linux gcc header u_int32_t' gives this:
The first link in that thread (about the duplicate post) gives more info, as does the last.

Basically they say that it appears that BSD types are being used and that you should typedef your own.

Another link from google results says that you can copy a kernel header over and use that, but it doesn't say whether the header is from BSD or Linux or Android or what:

This one from Apple gives some example typedefs:

Last edited by jamesf; 03-17-2013 at 09:02 AM. Reason: typo
Old 03-17-2013, 08:47 AM   #3
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,271

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Basic types are defined in "sys/types.h".
1 members found this post helpful.
Old 03-17-2013, 09:17 AM   #4
Registered: Apr 2010
Distribution: Slackware
Posts: 495

Original Poster
Rep: Reputation: 118Reputation: 118
Thanks guys, i must have missed the line with sys/types.h.

For the record, when adding the following patch to the SlackBuild, cairo-dock-plugins-3.1.2 builds successfully.

# EVIL HACK for 3.1.2
patch -p1 << EOF
--- a/alsaMixer/src/applet-struct.h	2013-03-17 15:06:12.220600026 +0100
+++ b/alsaMixer/src/applet-struct.h	2013-03-17 15:07:53.158202431 +0100
@@ -20,6 +20,7 @@
 #ifndef __CD_APPLET_STRUCT__
 #define  __CD_APPLET_STRUCT__
+#include <sys/types.h>
 #include <alsa/asoundlib.h>
 #include <cairo-dock.h>


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What Does #include <asm/types.h> Do ? minivy Linux - Software 7 11-26-2011 02:57 PM
missing sys/types.h magusTX Linux From Scratch 6 05-11-2011 08:02 AM
Missing /usr/include/GL/gl.h openfun Ubuntu 1 04-24-2006 10:24 AM
include/linux/types.h and include/linux/posix_types.h kpachopoulos Programming 2 11-26-2005 05:52 AM
/include/linux/version.h is missing!!! eisheth.zenunim Linux From Scratch 2 03-23-2004 05:32 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration