]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
OpenBSD: Add support for missing routine memmove() in kernel.
authorAntoine Verheijen <antoine@ualberta.ca>
Mon, 21 Jan 2013 08:48:01 +0000 (01:48 -0700)
committerDerrick Brashear <shadow@your-file-system.com>
Mon, 21 Jan 2013 12:32:00 +0000 (04:32 -0800)
OpenBSD does not have the memmove() routine available to dynamically
loaded modules in its kernel. It exists but is not exported so it
winds up "mia" on dynamic load of the kernel module. It's needed for
the Heimdal code that's been added into OpenAFS. This patch deals
with this issue by creating an inline version in the OS-specific
param.h file.

Note that this issue does not seem to exist in the amd64 version of
OpenBSD so (at least for now) tis fix is only applied to the i386
version of the header files.

Change-Id: Ide8a5ff49cb662e145fd93aefd8e3a12d7cbead5
Reviewed-on: http://gerrit.openafs.org/8926
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/config/param.i386_obsd46.h
src/config/param.i386_obsd47.h
src/config/param.i386_obsd48.h

index aa6107d9749c02377a1a78f00238416ac64d414a..68c60e1692999c2c4474d202c53acfda463cab14 100644 (file)
 #define AFS_X86_ENV            1
 #define AFSLITTLE_ENDIAN       1
 
+#ifdef _KERNEL
+void bcopy(const void *, void *, size_t);
+
+static inline void *memmove(void *dst, const void *src, size_t len) {
+    bcopy(src, dst, len);
+    return(dst);
+}
+#endif
+
 #endif /* AFS_I386_PARAM_H */
index 28a24dc6c93e85a438dcddb62a3337ddb2bfe379..754b879b9c78c802c5e433a5349dd83da8bbdb2a 100644 (file)
 #define AFS_X86_ENV            1
 #define AFSLITTLE_ENDIAN       1
 
+#ifdef _KERNEL
+void bcopy(const void *, void *, size_t);
+
+static inline void *memmove(void *dst, const void *src, size_t len) {
+    bcopy(src, dst, len);
+    return(dst);
+}
+#endif
+
 #endif /* AFS_I386_PARAM_H */
index 00349767a77d68c52db137f19caaa470d7d4874a..9aa45379a20359f0b47f10fba4544f0d627a8d19 100644 (file)
 #define AFS_X86_ENV            1
 #define AFSLITTLE_ENDIAN       1
 
+#ifdef _KERNEL
+void bcopy(const void *, void *, size_t);
+
+static inline void *memmove(void *dst, const void *src, size_t len) {
+    bcopy(src, dst, len);
+    return(dst);
+}
+#endif
+
 #endif /* AFS_I386_PARAM_H */