LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


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

Rep: Reputation: 119Reputation: 119
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

Code:
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
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
Googling for 'linux gcc header u_int32_t' gives this: http://stackoverflow.com/questions/5...t-is-u-int32-t
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: https://coderwall.com/p/2lr87q

This one from Apple gives some example typedefs: http://opensource.apple.com/source/gcc/gcc-926/stdint.h

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

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

Original Poster
Rep: Reputation: 119Reputation: 119
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.

Code:
# 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>
 #define _STRUCT_TIMEVAL
 #include <cairo-dock.h>
EOF
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:28 PM.

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