summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/i386/libi386/biosacpi.c2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h2
-rw-r--r--sys/sys/diskpc98.h4
-rw-r--r--sys/sys/param.h6
4 files changed, 12 insertions, 2 deletions
diff --git a/sys/boot/i386/libi386/biosacpi.c b/sys/boot/i386/libi386/biosacpi.c
index f511eb7..ff8b1ca 100644
--- a/sys/boot/i386/libi386/biosacpi.c
+++ b/sys/boot/i386/libi386/biosacpi.c
@@ -61,7 +61,7 @@ biosacpi_detect(void)
return;
/* export values from the RSDP */
- sprintf(buf, "%p", VTOP(rsdp));
+ sprintf(buf, "%u", VTOP(rsdp));
setenv("hint.acpi.0.rsdp", buf, 1);
revision = rsdp->Revision;
if (revision == 0)
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h b/sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h
index cd4caaa..b810f07 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h
@@ -65,7 +65,7 @@ typedef long ctf_id_t;
* filling in ctf_sect_t structures and passing them to ctf_bufopen():
*/
typedef struct ctf_sect {
- char *cts_name; /* section name (if any) */
+ const char *cts_name; /* section name (if any) */
ulong_t cts_type; /* section type (ELF SHT_... value) */
ulong_t cts_flags; /* section flags (ELF SHF_... value) */
#if defined(sun)
diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h
index c20ca6c..66bda90 100644
--- a/sys/sys/diskpc98.h
+++ b/sys/sys/diskpc98.h
@@ -36,8 +36,11 @@
#include <sys/ioccom.h>
#define DOSBBSECTOR 0 /* DOS boot block relative sector number */
+#undef DOSPARTOFF
#define DOSPARTOFF 0
+#undef DOSPARTSIZE
#define DOSPARTSIZE 32
+#undef NDOSPART
#define NDOSPART 16
#define DOSMAGICOFFSET 510
#define DOSMAGIC 0xAA55
@@ -52,6 +55,7 @@
#define DOSMID_386BSD (PC98_MID_386BSD | PC98_MID_BOOTABLE)
#define DOSSID_386BSD (PC98_SID_386BSD | PC98_SID_ACTIVE)
+#undef DOSPTYP_386BSD
#define DOSPTYP_386BSD (DOSSID_386BSD << 8 | DOSMID_386BSD)
struct pc98_partition {
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 838769f..589a0f7 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -319,4 +319,10 @@ __END_DECLS
#define member2struct(s, m, x) \
((struct s *)(void *)((char *)(x) - offsetof(struct s, m)))
+/*
+ * Access a variable length array that has been declared as a fixed
+ * length array.
+ */
+#define __PAST_END(array, offset) (((typeof(*(array)) *)(array))[offset])
+
#endif /* _SYS_PARAM_H_ */
OpenPOWER on IntegriCloud