]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Add support for OpenBSD 4.6
authorAntoine Verheijen <antoine@ualberta.ca>
Mon, 8 Feb 2010 22:45:25 +0000 (15:45 -0700)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 9 Feb 2010 03:00:48 +0000 (19:00 -0800)
Add config param header and sysname number for OpenBSD 4.6.

As well, add an additional parameter to a call to ifa_ifwithnet()
when looking up the MTU for an interface to indicate that the call
should use the default routing table. With the advent of OpenBSD
4.6, the system has started to make provisions for multiple routing
tables which included a change to the calling sequence for this
routine.

Change-Id: Ia616400094ed36bc6f0e37f86d3b7448d5bd32c2
(cherry picked from commit ab17ebef16a04180b2ede8c8ed07cd9c1871ae42)
Reviewed-on: http://gerrit.openafs.org/1261
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/config/afs_sysnames.h
src/config/param.i386_obsd46.h [new file with mode: 0644]
src/rx/rx_kcommon.c

index 9468922431dc918a243d92eec24e7c4607ab4d57..e6b1a00891fa1be63f78cfb598ee5268f0dee05d 100644 (file)
 #define SYS_NAME_ID_i386_obsd43         2612
 #define SYS_NAME_ID_i386_obsd44         2613
 #define SYS_NAME_ID_i386_obsd45         2614
+#define SYS_NAME_ID_i386_obsd46         2615
 
 #define SYS_NAME_ID_amd64_linux2        2700
 #define SYS_NAME_ID_amd64_linux22       2701
diff --git a/src/config/param.i386_obsd46.h b/src/config/param.i386_obsd46.h
new file mode 100644 (file)
index 0000000..d19acab
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Jim Rees, University of Michigan CITI
+ */
+
+#ifndef        AFS_PARAM_H
+#define        AFS_PARAM_H
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define SYS_NAME               "i386_obsd46"
+#define SYS_NAME_ID            SYS_NAME_ID_i386_obsd46
+
+#define AFS_XBSD_ENV           1       /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV       1
+
+#define AFS_NAMEI_ENV          1       /* User space interface to file system */
+#define AFS_64BIT_ENV          1
+#define AFS_64BIT_CLIENT       1
+#define AFS_64BIT_IOPS_ENV     1       /* Needed for NAMEI */
+#define AFS_OBSD_ENV           1
+#define AFS_OBSD34_ENV         1
+#define AFS_OBSD35_ENV         1
+#define AFS_OBSD36_ENV         1
+#define AFS_OBSD37_ENV         1
+#define AFS_OBSD38_ENV         1
+#define AFS_OBSD39_ENV         1
+#define AFS_OBSD40_ENV         1
+#define AFS_OBSD41_ENV         1
+#define AFS_OBSD42_ENV         1
+#define AFS_OBSD43_ENV         1
+#define AFS_OBSD44_ENV         1
+#define AFS_OBSD45_ENV         1
+#define AFS_OBSD46_ENV         1
+#define AFS_NONFSTRANS         1
+#define AFS_VM_RDWR_ENV                1
+#define AFS_VFS_ENV            1
+#define AFS_VFSINCL_ENV                1
+
+#define FTRUNC O_TRUNC
+
+#define AFS_SYSCALL            208
+#define AFS_MOUNT_AFS          "afs"
+
+#define RXK_LISTENER_ENV       1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY    1      /* use gettimeofday to implement rx clock */
+
+#define AFSLITTLE_ENDIAN       1
+
+#ifndef IGNORE_STDS_H
+#include <afs/afs_sysnames.h>
+#endif
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#ifdef MULTIPROCESSOR
+#define AFS_GLOBAL_SUNLOCK     1
+#endif
+#define        AFS_SHORTGID            0       /* are group id's short? */
+
+#if    !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#endif /* AFS_PARAM_H */
index 927641bd3d3714824eed6887f1b9412a6e019572..f841e0ca2f64ad63dd9555c5531cfe77d27624ca 100644 (file)
@@ -773,6 +773,8 @@ rxi_FindIfnet(afs_uint32 addr, afs_uint32 * maskp)
     s.sin_addr.s_addr = addr;
 #ifdef AFS_DARWIN80_ENV
     ifad = ifaddr_withnet((struct sockaddr *)&s);
+#elif AFS_OBSD46_ENV
+    ifad = ifa_ifwithnet((struct sockaddr *)&s, 0);
 #else
     ifad = ifa_ifwithnet((struct sockaddr *)&s);
 #endif