From 89c1411fde7c977c3368b9a8efc58f046a869ad7 Mon Sep 17 00:00:00 2001 From: sterlingpickens Date: Fri, 2 May 2014 09:32:57 -0700 Subject: [PATCH 1/3] Update driver-opencl.c --- driver-opencl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver-opencl.c b/driver-opencl.c index 93a46d93..0b9dbce7 100644 --- a/driver-opencl.c +++ b/driver-opencl.c @@ -854,7 +854,7 @@ retry: // TODO: refactor cgsem_post(&thr->sem); } goto retry; - } if (!strncasecmp(&input, "d", 1)) { + } else if (!strncasecmp(&input, "d", 1)) { if (selected) selected = curses_int("Select GPU to disable"); if (selected < 0 || selected >= nDevs) { From 83d71da225e3cef599aa14b19b585a7722a1aadc Mon Sep 17 00:00:00 2001 From: sterlingpickens Date: Fri, 2 May 2014 09:36:35 -0700 Subject: [PATCH 2/3] Update sgminer.c --- sgminer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgminer.c b/sgminer.c index 980b4e39..6b267a7a 100644 --- a/sgminer.c +++ b/sgminer.c @@ -7941,7 +7941,7 @@ int main(int argc, char *argv[]) quithere(1, "Failed to pthread_mutex_init lockstat_lock errno=%d", errno); #endif - initial_args = (const char **)malloc(sizeof(char *)* (argc + 1)); + initial_args = (char **)malloc(sizeof(char *)* (argc + 1)); for (i = 0; i < argc; i++) initial_args[i] = strdup(argv[i]); initial_args[argc] = NULL; From ff45bb3a851deae376ca60d2b69f32dc0bcb6ea0 Mon Sep 17 00:00:00 2001 From: sterlingpickens Date: Fri, 2 May 2014 09:44:10 -0700 Subject: [PATCH 3/3] Update configure.ac #include no #include needed in linux, fixes make warning --- configure.ac | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index e7eed741..688d23c4 100644 --- a/configure.ac +++ b/configure.ac @@ -295,12 +295,21 @@ fi AM_CONDITIONAL(USE_GIT_VERSION, [test x$usegitver = xyes]) #check execv signature -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - int execv(const char*, char *const*); - ])], - AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]), - AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);])) +if test "x$have_linux" == xtrue; then + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #include + int execv(const char*, char *const*); + ])], + AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]), + AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);])) +else + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #include + int execv(const char*, char *const*); + ])], + AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]), + AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);])) +fi dnl CCAN wants to know a lot of vars. # All the configuration checks. Regrettably, the __attribute__ checks will