summaryrefslogtreecommitdiff
path: root/dix/resource.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-09-10 15:21:32 -0700
committerKeith Packard <keithp@keithp.com>2014-09-18 15:29:29 -0700
commit69d8572ae4cd1bce17223ea8aff87916a974c861 (patch)
tree02012e94ccdaa25e9128e53b1581835da31863ac /dix/resource.c
parenta11fc2493e85e4a532f4954805a7c6d1c601b08f (diff)
Build required portions of registry.c automatically [v2]
Instead of making the inclusion of the registry code a global conditional, split the registry into two pieces; the bits required by the X-Resource extension (the resource names) and the bits required by the XCSECURITY extension (the protocol names). Build each set of code if the related extension is being built. v2: Check for both XCSECURITY and XSELINUX. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'dix/resource.c')
-rw-r--r--dix/resource.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/resource.c b/dix/resource.c
index 623d862d6..c254244a3 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -524,8 +524,10 @@ CreateNewResourceType(DeleteType deleteFunc, const char *name)
resourceTypes[next].findSubResFunc = DefaultFindSubRes;
resourceTypes[next].errorValue = BadValue;
+#if X_REGISTRY_RESOURCE
/* Called even if name is NULL, to remove any previous entry */
RegisterResourceName(next, name);
+#endif
return next;
}