ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:107336] [Ruby master Bug#18556] error: use of undeclared identifier 'MAP_ANONYMOUS'
@ 2022-01-29  3:08 ryandesign (Ryan Schmidt)
  2022-01-29  7:28 ` [ruby-core:107340] " nobu (Nobuyoshi Nakada)
  2022-02-07 10:55 ` [ruby-core:107498] " naruse (Yui NARUSE)
  0 siblings, 2 replies; 3+ messages in thread
From: ryandesign (Ryan Schmidt) @ 2022-01-29  3:08 UTC (permalink / raw
  To: ruby-core

Issue #18556 has been reported by ryandesign (Ryan Schmidt).

----------------------------------------
Bug #18556: error: use of undeclared identifier 'MAP_ANONYMOUS'
https://bugs.ruby-lang.org/issues/18556

* Author: ryandesign (Ryan Schmidt)
* Status: Open
* Priority: Normal
* ruby -v: 3.1.0
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
ruby 3.1.0 fails to build on older versions of macOS such as OS X 10.10.5:

```
gc.c:11141:88: error: use of undeclared identifier 'MAP_ANONYMOUS'
        char *ptr = mmap(NULL, alignment + size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
                                                                                       ^
1 error generated.
```

`MAP_ANONYMOUS` used to be called `MAP_ANON` on older systems; I suggest either using `MAP_ANON` everywhere you're using `MAP_ANONYMOUS`, or else add a block like this somewhere central that each of those files uses:

```
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
```

or

```
#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
#define MAP_ANONYMOUS MAP_ANON
#endif
```

(Such blocks already occur in multiple places under ext/fiddle/libffi-3.2.1 in the ruby 3.1.0 source code.)



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:107340] [Ruby master Bug#18556] error: use of undeclared identifier 'MAP_ANONYMOUS'
  2022-01-29  3:08 [ruby-core:107336] [Ruby master Bug#18556] error: use of undeclared identifier 'MAP_ANONYMOUS' ryandesign (Ryan Schmidt)
@ 2022-01-29  7:28 ` nobu (Nobuyoshi Nakada)
  2022-02-07 10:55 ` [ruby-core:107498] " naruse (Yui NARUSE)
  1 sibling, 0 replies; 3+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-01-29  7:28 UTC (permalink / raw
  To: ruby-core

Issue #18556 has been updated by nobu (Nobuyoshi Nakada).

Backport changed from 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN to 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED

https://github.com/ruby/ruby/pull/5506

----------------------------------------
Bug #18556: error: use of undeclared identifier 'MAP_ANONYMOUS'
https://bugs.ruby-lang.org/issues/18556#change-96237

* Author: ryandesign (Ryan Schmidt)
* Status: Open
* Priority: Normal
* ruby -v: 3.1.0
* Backport: 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED
----------------------------------------
ruby 3.1.0 fails to build on older versions of macOS such as OS X 10.10.5:

```
gc.c:11141:88: error: use of undeclared identifier 'MAP_ANONYMOUS'
        char *ptr = mmap(NULL, alignment + size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
                                                                                       ^
1 error generated.
```

`MAP_ANONYMOUS` used to be called `MAP_ANON` on older systems; I suggest either using `MAP_ANON` everywhere you're using `MAP_ANONYMOUS`, or else add a block like this somewhere central that each of those files uses:

```
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
```

or

```
#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
#define MAP_ANONYMOUS MAP_ANON
#endif
```

(Such blocks already occur in multiple places under ext/fiddle/libffi-3.2.1 in the ruby 3.1.0 source code.)



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:107498] [Ruby master Bug#18556] error: use of undeclared identifier 'MAP_ANONYMOUS'
  2022-01-29  3:08 [ruby-core:107336] [Ruby master Bug#18556] error: use of undeclared identifier 'MAP_ANONYMOUS' ryandesign (Ryan Schmidt)
  2022-01-29  7:28 ` [ruby-core:107340] " nobu (Nobuyoshi Nakada)
@ 2022-02-07 10:55 ` naruse (Yui NARUSE)
  1 sibling, 0 replies; 3+ messages in thread
From: naruse (Yui NARUSE) @ 2022-02-07 10:55 UTC (permalink / raw
  To: ruby-core

Issue #18556 has been updated by naruse (Yui NARUSE).

Backport changed from 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED to 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE

ruby_3_1 e54289bb632047b750f9c9371410d1adff2a740a merged revision(s) 67f4729.

----------------------------------------
Bug #18556: error: use of undeclared identifier 'MAP_ANONYMOUS'
https://bugs.ruby-lang.org/issues/18556#change-96405

* Author: ryandesign (Ryan Schmidt)
* Status: Closed
* Priority: Normal
* ruby -v: 3.1.0
* Backport: 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE
----------------------------------------
ruby 3.1.0 fails to build on older versions of macOS such as OS X 10.10.5:

```
gc.c:11141:88: error: use of undeclared identifier 'MAP_ANONYMOUS'
        char *ptr = mmap(NULL, alignment + size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
                                                                                       ^
1 error generated.
```

`MAP_ANONYMOUS` used to be called `MAP_ANON` on older systems; I suggest either using `MAP_ANON` everywhere you're using `MAP_ANONYMOUS`, or else add a block like this somewhere central that each of those files uses:

```
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
```

or

```
#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
#define MAP_ANONYMOUS MAP_ANON
#endif
```

(Such blocks already occur in multiple places under ext/fiddle/libffi-3.2.1 in the ruby 3.1.0 source code.)



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-07 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-29  3:08 [ruby-core:107336] [Ruby master Bug#18556] error: use of undeclared identifier 'MAP_ANONYMOUS' ryandesign (Ryan Schmidt)
2022-01-29  7:28 ` [ruby-core:107340] " nobu (Nobuyoshi Nakada)
2022-02-07 10:55 ` [ruby-core:107498] " naruse (Yui NARUSE)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).