Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lang/mono does not have getdomainame which seems to be used a lot #486

Open
sjorge opened this issue Apr 22, 2017 · 1 comment
Open

lang/mono does not have getdomainame which seems to be used a lot #486

sjorge opened this issue Apr 22, 2017 · 1 comment

Comments

@sjorge
Copy link

sjorge commented Apr 22, 2017

Looks like lang/mono gets build with getdomainname disabled.

The few mono apps I tried all want and and fail in various ways. (e.g. sonarr and radarr being some of them) Not being able to do a DNS lookup is rather painful.

I haven't tried it but there seems to be a patch available:
https://bugzilla.xamarin.com/show_bug.cgi?id=32010

@sjorge
Copy link
Author

sjorge commented Apr 22, 2017

Patch does not apply, looks like some of it is no longer needed. It compiles with only the last 2 fragments applied. Testing now.

Still does not work with this patch:

$NetBSD$

--- support/unistd.c.orig       2015-08-25 20:33:41.000000000 +0000
+++ support/unistd.c
@@ -210,6 +210,9 @@ Mono_Posix_Syscall_sethostid (gint64 hos
 #endif /* def HAVE_SETHOSTID */

 #ifdef HAVE_GETDOMAINNAME
+#ifdef PLATFORM_SOLARIS
+extern int getdomainname (char *name, int namelen);
+#endif
 gint32
 Mono_Posix_Syscall_getdomainname (char *name, mph_size_t len)
 {
@@ -219,6 +222,9 @@ Mono_Posix_Syscall_getdomainname (char *
 #endif /* def HAVE_GETDOMAINNAME */

 #ifdef HAVE_SETDOMAINNAME
+#ifdef PLATFORM_SOLARIS
+extern int setdomainname (const char *name, int namelen);
+#endif
 gint32
 Mono_Posix_Syscall_setdomainname (const char *name, mph_size_t len)
 {

I also commented this in the Makefile

#CONFIGURE_ENV+=                ac_cv_func_getdomainname=no
#CONFIGURE_ENV+=                ac_cv_func_setdomainname=no

I tested using Sonarr, it keeps failing on getdomainname not being able to resolve addresses 👎

[Warn] Fanzub: Unable to connect to indexer

[v2.0.0.4689] System.EntryPointNotFoundException: getdomainname
  at (wrapper managed-to-native) System.Net.NetworkInformation.CommonUnixIPGlobalProperties:getdomainname (byte[],int)
  at System.Net.NetworkInformation.CommonUnixIPGlobalProperties.get_DomainName () [0x00000] in <filename unknown>:0
  at System.Net.CookieContainer..ctor () [0x00000] in <filename unknown>:0
  at NzbDrone.Common.Http.HttpClient+<>c.<PrepareRequestCookies>b__8_0 () [0x00000] in <filename unknown>:0
  at NzbDrone.Common.Cache.Cached`1[System.Net.CookieContainer].Get (System.String key, System.Func`1 function, Nullable`1 lifeTime) [0x00000] in <filename unknown>:0
  at NzbDrone.Common.Http.HttpClient.PrepareRequestCookies (NzbDrone.Common.Http.HttpRequest request) [0x00000] in <filename unknown>:0
  at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00000] in <filename unknown>:0
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[NzbDrone.Core.Indexers.Fanzub.FanzubSettings].FetchIndexerResponse (NzbDrone.Core.Indexers.IndexerRequest request) [0x00000] in <filename unknown>:0
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[NzbDrone.Core.Indexers.Fanzub.FanzubSettings].FetchPage (NzbDrone.Core.Indexers.IndexerRequest request, IParseIndexerResponse parser) [0x00000] in <filename unknown>:0
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[NzbDrone.Core.Indexers.Fanzub.FanzubSettings].TestConnection () [0x00000] in <filename unknown>:0

I did not retry other apps like Radarr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant