1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
Index: libreparse/usr/src/lib/libreparse/common/fs_reparse_lib.c
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/common/fs_reparse_lib.c 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/common/fs_reparse_lib.c 2013-09-28 13:54:06.059165347 +0400
@@ -42,7 +42,13 @@
#include <sys/fs_reparse.h>
#include "rp_plugin.h"
+#ifndef RP_LIB_DIR
+# define RP_LIB_DIR "/usr/lib/reparse"
+#endif
+
+#ifndef RP_NO_ISA
#define MAXISALEN 257 /* based on sysinfo(2) man page */
+#endif
static rp_proto_handle_t rp_proto_handle;
static rp_proto_plugin_t *rp_proto_list;
@@ -304,7 +310,7 @@
rp_plugin_init()
{
int err, ret = RP_OK;
- char isa[MAXISALEN], dirpath[MAXPATHLEN], path[MAXPATHLEN];
+ char path[MAXPATHLEN];
int num_protos = 0;
rp_proto_handle_t *rp_hdl;
rp_proto_plugin_t *proto, *tmp;
@@ -314,6 +320,8 @@
DIR *dir;
struct dirent *dent;
+#ifndef RP_NO_ISA
+ char isa[MAXISALEN], dirpath[MAXPATHLEN];
#if defined(_LP64)
if (sysinfo(SI_ARCHITECTURE_64, isa, MAXISALEN) == -1)
isa[0] = '\0';
@@ -323,6 +331,9 @@
(void) snprintf(dirpath, MAXPATHLEN,
"%s/%s", RP_LIB_DIR, isa);
+#else /* defined RP_NO_ISA */
+ const char *dirpath = RP_LIB_DIR;
+#endif /* ! RP_NO_ISA */
if ((dir = opendir(dirpath)) == NULL)
return (RP_NO_PLUGIN_DIR);
Index: libreparse/usr/src/lib/libreparse/common/rp_plugin.h
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/common/rp_plugin.h 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/common/rp_plugin.h 2013-09-28 13:44:17.605631838 +0400
@@ -33,7 +33,6 @@
#include <sys/types.h>
-#define RP_LIB_DIR "/usr/lib/reparse"
#define RP_PLUGIN_V1 1
/*
Index: libreparse/usr/src/lib/libreparse/Makefile.com
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/Makefile.com 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/Makefile.com 2013-09-28 13:54:44.064377538 +0400
@@ -41,6 +41,7 @@
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(COMDIR) -D_FILE_OFFSET_BITS=64
+CPPFLAGS += -DRP_NO_ISA
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
Index: libreparse/usr/src/lib/libreparse/amd64/Makefile
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/amd64/Makefile 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/amd64/Makefile 2013-09-28 13:56:26.869990779 +0400
@@ -26,4 +26,6 @@
include ../Makefile.com
include ../../Makefile.lib.64
+CPPFLAGS += -DRP_LIB_DIR=\"$(DEB_USRLIBDIR_64)/reparse\"
+
install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
Index: libreparse/usr/src/lib/libreparse/i386/Makefile
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/i386/Makefile 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/i386/Makefile 2013-09-28 13:56:06.136791730 +0400
@@ -25,4 +25,6 @@
include ../Makefile.com
+CPPFLAGS += -DRP_LIB_DIR=\"$(DEB_USRLIBDIR_32)/reparse\"
+
install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
|