ok
with pio.h compilation is OK, I get a.out, but starting it, I get errors:

./a.out -f 10
open fail
open fail
open fail
open fail
Firebox not detected.
If this is a Firebox it's either one we don't know about or it's running a
bios we haven't seen.
Hit the pfSense forums to let us know more.


I think the error is related to missing /dev/io in openBSD


line 55                  || (port_access_handle = fopen("/dev/io", "rw"))
!= NULL) {


is there a solution?


2017-10-05 20:08 GMT+02:00 antonio lapira <ant1...@gmail.com>:

> # uname -a
> OpenBSD bsd750e.my.domain 6.1 GENERIC.MP#291 i386
>
>
> ORIGINAL FILE
>
> # cc WGXepc.c
>
> /tmp//cckbgvzi.o: In function `port_out':
> WGXepc.c:(.text+0x122): undefined reference to `outb'
> /tmp//cckbgvzi.o: In function `port_in':
> WGXepc.c:(.text+0x2a4): undefined reference to `inb'
> collect2: ld returned 1 exit status
> #
> #
> #
>
>
>
> Added
> #include <machine/pio.h>.
>
>
>
>
> # cc WGXepc3.c
>
>
>
> In file included from WGXepc3.c:1:
> /usr/include/machine/pio.h:61: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '__inbc'
> /usr/include/machine/pio.h:69: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '__inb'
> /usr/include/machine/pio.h:87: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '__inwc'
> /usr/include/machine/pio.h:95: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '__inw'
> /usr/include/machine/pio.h:113: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '__inlc'
> /usr/include/machine/pio.h:121: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '__inl'
> /usr/include/machine/pio.h:139: error: expected declaration specifiers or
> '...' before 'u_int8_t'
> /usr/include/machine/pio.h: In function '__outbc':
> /usr/include/machine/pio.h:141: error: 'data' undeclared (first use in
> this function)
> /usr/include/machine/pio.h:141: error: (Each undeclared identifier is
> reported only once
> /usr/include/machine/pio.h:141: error: for each function it appears in.)
> /usr/include/machine/pio.h: At top level:
> /usr/include/machine/pio.h:145: error: expected declaration specifiers or
> '...' before 'u_int8_t'
> /usr/include/machine/pio.h: In function '__outb':
> /usr/include/machine/pio.h:147: error: 'data' undeclared (first use in
> this function)
> /usr/include/machine/pio.h: At top level:
> /usr/include/machine/pio.h:161: error: expected declaration specifiers or
> '...' before 'u_int16_t'
> /usr/include/machine/pio.h: In function '__outwc':
> /usr/include/machine/pio.h:163: error: 'data' undeclared (first use in
> this function)
> /usr/include/machine/pio.h: At top level:
> /usr/include/machine/pio.h:167: error: expected declaration specifiers or
> '...' before 'u_int16_t'
> /usr/include/machine/pio.h: In function '__outw':
> /usr/include/machine/pio.h:169: error: 'data' undeclared (first use in
> this function)
> /usr/include/machine/pio.h: At top level:
> /usr/include/machine/pio.h:183: error: expected declaration specifiers or
> '...' before 'u_int32_t'
> /usr/include/machine/pio.h: In function '__outlc':
> /usr/include/machine/pio.h:185: error: 'data' undeclared (first use in
> this function)
> /usr/include/machine/pio.h: At top level:
> /usr/include/machine/pio.h:189: error: expected declaration specifiers or
> '...' before 'u_int32_t'
> /usr/include/machine/pio.h: In function '__outl':
> /usr/include/machine/pio.h:191: error: 'data' undeclared (first use in
> this function)
> WGXepc3.c: In function 'port_out':
> WGXepc3.c:58: error: too many arguments to function '__outbc'
> WGXepc3.c:58: error: too many arguments to function '__outb'
>
>
>
>
>
>
>
>
>
>
>
>
>
> 2017-10-05 19:55 GMT+02:00 Jeremie Courreges-Anglas <j...@wxcvbn.org>:
>
>> On Thu, Oct 05 2017, antonio lapira <ant1...@gmail.com> wrote:
>> > Hi
>> > I need to compile a source file on openBSD
>> >
>> >
>> > This is the source code
>> > https://paste.debian.net/plain/989074
>> >
>> > I need it to reduce fan speed of the machine
>>
>> That doesn't sound like a good idea.
>>
>> > on FreeBSD I do:
>> > cc WGXepc.c
>> > and I get a.out working
>> >
>> > on OpenBSD, I get some errors
>>
>> It would be just as easy to add those to your mail.
>>
>> > Could you help me?
>>
>> Add #include <machine/pio.h>.  I'm not sure I'm actually helping you,
>> use at your own risk (tm).
>>
>> > Thanks
>>
>>
>> --
>> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524
>> E7EE
>>
>
>

Reply via email to