ectool: fix NetBSD compilation
Since NetBSD does not support uname -o, push check for CygWin inside separate non-failing condition in Makefile. Change-Id: Ibd264384f49b33412f0ef8554bd9c9fb8f60a892 Signed-off-by: Andrey Korolyov <andrey@xdel.ru> Reviewed-on: https://review.coreboot.org/12831 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
committed by
Patrick Georgi
parent
ffc2260d74
commit
393d9322ba
@ -17,9 +17,25 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifndef __NetBSD__
|
||||
#include <sys/io.h>
|
||||
#endif
|
||||
#include "ec.h"
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#include <machine/sysarch.h>
|
||||
static uint8_t inb(unsigned port)
|
||||
{
|
||||
uint8_t data;
|
||||
__asm volatile("inb %w1,%0" : "=a" (data) : "d" (port));
|
||||
return data;
|
||||
}
|
||||
static __inline void outb(uint8_t data, unsigned port)
|
||||
{
|
||||
__asm volatile("outb %0,%w1" : : "a" (data), "d" (port));
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int verbose;
|
||||
|
||||
#define debug(x...) if (verbose) printf(x)
|
||||
|
Reference in New Issue
Block a user