--- parallel-4.0.1.orig/src/p-control.cc	2021-03-17 05:03:09.000000000 +1100
+++ parallel-4.0.1/src/p-control.cc	2023-03-19 09:32:18.000000000 +1100
@@ -286,7 +286,7 @@
         }
       else
         {
-          nproc_max = num_processors (NPROC_CURRENT);
+          nproc_max = octave_num_processors_wrapper (NPROC_CURRENT);
 
           gnulib_pollfds = gnulib_alloc_pollfds (nproc_max);
         }
--- parallel-4.0.1.orig/src/configure	2021-03-17 05:03:44.766737817 +1100
+++ parallel-4.0.1/src/configure	2023-03-19 09:32:18.000000000 +1100
@@ -23482,11 +23482,11 @@
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
 
-$as_echo "#define OCTAVE__INTERPRETER__SYMBOL_TABLE__ASSIGN octave::interpreter::the_interpreter () -> get_symbol_table ().assign" >>confdefs.h
+$as_echo "#define OCTAVE__INTERPRETER__SYMBOL_TABLE__ASSIGN octave::interpreter::the_interpreter () -> assign" >>confdefs.h
 
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: octave::interpreter::the_interpreter () -> get_symbol_table ().assign" >&5
-$as_echo "octave::interpreter::the_interpreter () -> get_symbol_table ().assign" >&6; }
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: octave::interpreter::the_interpreter () -> assign" >&5
+$as_echo "octave::interpreter::the_interpreter () -> assign" >&6; }
      echo '
 ' >> oct-alt-includes.h
 else
--- parallel-4.0.1.orig/src/error-helpers.h	2021-03-17 05:03:09.000000000 +1100
+++ parallel-4.0.1/src/error-helpers.h	2023-03-19 09:32:18.000000000 +1100
@@ -1,10 +1,10 @@
 /*
 
-Copyright (C) 2016-2018 Olaf Till <i7tiol@t-online.de>
+Copyright (C) 2016-2019 Olaf Till <i7tiol@t-online.de>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
+the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
@@ -44,13 +44,6 @@
     try \
       { \
         code ; \
- \
-        if (error_state) \
-          { \
-            error (__VA_ARGS__); \
- \
-            return retval; \
-          } \
       } \
     catch (OCTAVE__EXECUTION_EXCEPTION& e) \
       { \
@@ -64,7 +57,9 @@
       } \
     catch (OCTAVE__EXECUTION_EXCEPTION& e) \
       { \
-        verror (e, __VA_ARGS__); \
+        _p_error (__VA_ARGS__); \
+ \
+        exit (1); \
       }
 #endif
 
@@ -77,13 +72,6 @@
     try \
       { \
         code ; \
- \
-        if (error_state) \
-          { \
-            _p_error (__VA_ARGS__); \
- \
-            exit (1); \
-          } \
       } \
     catch (OCTAVE__EXECUTION_EXCEPTION&) \
       { \
@@ -116,11 +104,6 @@
     try \
       { \
         code ; \
-        if (error_state) \
-          { \
-            error_state = 0; \
-            err = true; \
-          } \
       } \
     catch (OCTAVE__EXECUTION_EXCEPTION&) \
       { \
--- parallel-4.0.1.orig/src/pconnect.cc	2021-03-17 05:03:09.000000000 +1100
+++ parallel-4.0.1/src/pconnect.cc	2023-03-19 09:32:18.000000000 +1100
@@ -407,7 +407,7 @@
   network->insert_connection (conn, 0);
 
   // store number of processor cores available in client
-  conn->set_nproc (num_processors (NPROC_CURRENT));
+  conn->set_nproc (octave_num_processors_wrapper (NPROC_CURRENT));
 
   for (uint32_t i = 0; i < nhosts; i++)
     {
--- parallel-4.0.1.orig/src/__octave_server__.cc	2021-03-17 05:03:09.000000000 +1100
+++ parallel-4.0.1/src/__octave_server__.cc	2023-03-19 09:32:18.000000000 +1100
@@ -317,7 +317,7 @@
 #endif // HAVE_LIBGNUTLS
 
   // determine own number of usable processor cores
-  uint32_t nproc = num_processors (NPROC_CURRENT);
+  uint32_t nproc = octave_num_processors_wrapper (NPROC_CURRENT);
 
   // The servers command stream will not be inserted into a
   // connection object.
--- parallel-4.0.1.orig/src/p-connection.cc	2021-03-17 05:03:09.000000000 +1100
+++ parallel-4.0.1/src/p-connection.cc	2023-03-19 09:54:33.000000000 +1100
@@ -18,7 +18,7 @@
 */
 
 #include <octave/oct.h>
-#include <octave/Array.cc>
+#include <octave/Array-oct.cc>
 
 #include "parallel-gnutls.h"
 
--- parallel-4.0.1.orig/src/parallel-gnutls.h	2021-03-17 05:03:09.000000000 +1100
+++ parallel-4.0.1/src/parallel-gnutls.h	2023-03-19 09:32:18.000000000 +1100
@@ -44,7 +44,7 @@
 
 #include <stdint.h>
 
-// We link against the gnulib num_processors() used by Octave. nproc.h
+// We link against the gnulib octave_num_processors_wrapper() used by Octave. nproc.h
 // used by Octave is not accessible. If the interface changes, this
 // will stop working.
 extern "C" {
@@ -58,7 +58,7 @@
 
 /* Return the total number of processors.  The result is guaranteed to
    be at least 1.  */
-extern unsigned long int num_processors (enum nproc_query query);
+extern unsigned long int octave_num_processors_wrapper (enum nproc_query query);
 }
 
 
