From 9adf466e97a590fe733a68d133f713e990d1c5f0 Mon Sep 17 00:00:00 2001
From: Volodymyr Medvid <vmedvid@riseup.net>
Date: Sun, 1 Mar 2020 23:34:33 +0200
Subject: [PATCH] Move MAXDEPTH symbol to lib66.so

Prevent symbol lookup error in commands linked to lib66.so:

66-tree: symbol lookup error: /usr/x86_64-pc-linux-gnu/lib/lib66.so.0.2:
undefined symbol: MAXDEPTH
---
 src/66/66-inservice.c     | 1 -
 src/66/66-intree.c        | 1 -
 src/lib66/ss_info_utils.c | 2 ++
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/66/66-inservice.c b/src/66/66-inservice.c
index e69120ce..aa0a65aa 100644
--- a/src/66/66-inservice.c
+++ b/src/66/66-inservice.c
@@ -47,7 +47,6 @@
 
 static unsigned int REVERSE = 0 ;
 static unsigned int NOFIELD = 1 ;
-unsigned int MAXDEPTH = 1 ;
 static unsigned int GRAPH = 0 ;
 static char const *const *ENVP ;
 static unsigned int nlog = 20 ;
diff --git a/src/66/66-intree.c b/src/66/66-intree.c
index 2a4cdfa4..26c5e20c 100644
--- a/src/66/66-intree.c
+++ b/src/66/66-intree.c
@@ -42,7 +42,6 @@
 
 static unsigned int REVERSE = 0 ;
 static unsigned int NOFIELD = 1 ;
-unsigned int MAXDEPTH = 1 ;
 static unsigned int GRAPH = 0 ;
 static uid_t OWNER ;
 static char OWNERSTR[UID_FMT] ;
diff --git a/src/lib66/ss_info_utils.c b/src/lib66/ss_info_utils.c
index f45966b7..e9b8e3cf 100644
--- a/src/lib66/ss_info_utils.c
+++ b/src/lib66/ss_info_utils.c
@@ -31,6 +31,8 @@
 
 #include <66/resolve.h>
 
+unsigned int MAXDEPTH = 1 ;
+
 ss_resolve_graph_style graph_utf8 = {
 	UTF_VR UTF_H,
 	UTF_UR UTF_H,
-- 
GitLab