請問Solaris上的outb()要如何link ? - Linux

By Anonymous
at 2016-11-16T16:56
at 2016-11-16T16:56
Table of Contents
抱歉借Linux版 問Solaris的問題
最近在porting linux source code到Solaris(Omni OS)上
outb()可以找得到對應的header file, link時卻會undefined symbol
不知道有沒有熟悉Solaris的前輩知道, 它在哪個檔案裡?
// 下面是簡單範例, gcc main.c 在Linux會過
// Solaris下會 undefined symbol : outb
#if defined(__linux__)
#include <sys/io.h>
#elif defined(__sun)
#include <sys/ddi.h>
#include <sys/sunddi.h>
#endif
int main() {
int port = 0;
unsigned char value = 0;
#if defined(__linux__)
outb(value,port);
#elif defined(__sun)
outb(port,value);
#endif
return 0;
}
--
最近在porting linux source code到Solaris(Omni OS)上
outb()可以找得到對應的header file, link時卻會undefined symbol
不知道有沒有熟悉Solaris的前輩知道, 它在哪個檔案裡?
// 下面是簡單範例, gcc main.c 在Linux會過
// Solaris下會 undefined symbol : outb
#if defined(__linux__)
#include <sys/io.h>
#elif defined(__sun)
#include <sys/ddi.h>
#include <sys/sunddi.h>
#endif
int main() {
int port = 0;
unsigned char value = 0;
#if defined(__linux__)
outb(value,port);
#elif defined(__sun)
outb(port,value);
#endif
return 0;
}
--
Tags:
Linux
All Comments

By Belly
at 2016-11-20T06:31
at 2016-11-20T06:31

By Megan
at 2016-11-23T15:23
at 2016-11-23T15:23

By Ursula
at 2016-11-27T19:04
at 2016-11-27T19:04
Related Posts
CentOS無法開機

By Leila
at 2016-11-15T20:37
at 2016-11-15T20:37
virtualbox拿到實體hd serial number

By Kama
at 2016-11-15T18:12
at 2016-11-15T18:12
ethtool 在script的問題

By Zora
at 2016-11-15T11:21
at 2016-11-15T11:21
rc.local執行時機

By Oscar
at 2016-11-15T11:00
at 2016-11-15T11:00
各位最喜歡的ssh工具

By Ethan
at 2016-11-14T17:19
at 2016-11-14T17:19