1645N/A# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
1645N/A#
1645N/A# Permission is hereby granted, free of charge, to any person obtaining a
1645N/A# copy of this software and associated documentation files (the "Software"),
1645N/A# to deal in the Software without restriction, including without limitation
1645N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1645N/A# and/or sell copies of the Software, and to permit persons to whom the
1645N/A# Software is furnished to do so, subject to the following conditions:
1645N/A#
1645N/A# The above copyright notice and this permission notice (including the next
1645N/A# paragraph) shall be included in all copies or substantial portions of the
1645N/A# Software.
1645N/A#
1645N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1645N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1645N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1645N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1645N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1645N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1645N/A# DEALINGS IN THE SOFTWARE.
1645N/A#
1645N/A
1647N/A--- src/lib/arch/unix/ArchPluginUnix.cpp.orig Tue Mar 15 12:03:49 2016
1647N/A+++ src/lib/arch/unix/ArchPluginUnix.cpp Wed Jul 27 11:22:25 2016
1647N/A@@ -48,6 +48,19 @@
1645N/A void
1645N/A ArchPluginUnix::load()
1645N/A {
1645N/A+#if __sun
1647N/A+#define LIBNS "/usr/lib/synergy/plugins/libns.so"
1647N/A+
1645N/A+ LOG((CLOG_DEBUG "loading plugin: %s", LIBNS));
1645N/A+ void* handle = dlopen(LIBNS, RTLD_LAZY);
1645N/A+ if (handle == NULL) {
1645N/A+ LOG((CLOG_ERR "failed to load plugin '%s', error: %s",
1645N/A+ LIBNS, dlerror()));
1645N/A+ return;
1645N/A+ }
1645N/A+ LOG((CLOG_DEBUG "plugin loaded: %s",
1645N/A+ LIBNS));
1645N/A+#else
1645N/A String pluginsDir = getPluginsDir();
1645N/A LOG((CLOG_DEBUG "plugins dir: %s", pluginsDir.c_str()));
1645N/A
1647N/A@@ -108,6 +121,7 @@
1645N/A
1645N/A m_pluginTable.insert(std::make_pair(name, handle));
1645N/A }
1645N/A+#endif /* __sun */
1645N/A }
1645N/A
1645N/A void