diff --git a/numba/core/serialize.py b/numba/core/serialize.py
index ef8c5af80..4cecf4d19 100644
--- a/numba/core/serialize.py
+++ b/numba/core/serialize.py
@@ -66,7 +66,7 @@ def _reduce_function(func, globs):
         cells = [cell.cell_contents for cell in func.__closure__]
     else:
         cells = None
-    return _reduce_code(func.__code__), globs, func.__name__, cells
+    return _reduce_code(func.__code__), globs, func.__name__, cells, func.__defaults__
 
 def _reduce_code(code):
     """
@@ -80,7 +80,7 @@ def _dummy_closure(x):
     """
     return lambda: x
 
-def _rebuild_function(code_reduced, globals, name, cell_values):
+def _rebuild_function(code_reduced, globals, name, cell_values, defaults):
     """
     Rebuild a function from its _reduce_function() results.
     """
@@ -96,7 +96,7 @@ def _rebuild_function(code_reduced, globals, name, cell_values):
         # If the module can't be found, avoid passing it (it would produce
         # errors when lowering).
         del globals['__name__']
-    return FunctionType(code, globals, name, (), cells)
+    return FunctionType(code, globals, name, defaults, cells)
 
 def _rebuild_code(marshal_version, bytecode_magic, marshalled):
     """

TypeError using default arguments with multiprocessing
When using default arguments in a jit'ed function, I get a TypeError when the function is called from a `multiprocessing` worker and the default arguments are omitted. The function works when run single-threaded. Minimal working example:

```python
from multiprocessing import Pool

from numba import jit


@jit
def add1(x):
    return x + 1

@jit
def add2(x, y=1):
    return x + y

if __name__ == "__main__":
    with Pool(2) as p:
        print(p.map(add1, [1, 2, 3]))  # [2, 3, 4] (OK)
        print(add2(1))  # 2 (OK)
        print(p.map(add2, [1, 2, 3]))  # TypeError
```

Output:
```
[2, 3, 4]
2
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.7.3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/root/.pyenv/versions/3.7.3/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
TypeError: not enough arguments: expected 2, got 1
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "smpe_paper/numba_test.py", line 18, in <module>
    print(p.map(add2, [1, 2, 3]))
  File "/root/.pyenv/versions/3.7.3/lib/python3.7/multiprocessing/pool.py", line 268, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/root/.pyenv/versions/3.7.3/lib/python3.7/multiprocessing/pool.py", line 657, in get
    raise self._value
TypeError: not enough arguments: expected 2, got 1
(smpe-paper) root@5b798e37487d:/smpe-paper# python smpe_paper/numba_test.py
[2, 3, 4]
2
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.7.3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/root/.pyenv/versions/3.7.3/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
TypeError: not enough arguments: expected 2, got 1
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "smpe_paper/numba_test.py", line 18, in <module>
    print(p.map(add2, [1, 2, 3]))  # TypeError
  File "/root/.pyenv/versions/3.7.3/lib/python3.7/multiprocessing/pool.py", line 268, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/root/.pyenv/versions/3.7.3/lib/python3.7/multiprocessing/pool.py", line 657, in get
    raise self._value
TypeError: not enough arguments: expected 2, got 1
```

Expected output:
```
[2, 3, 4]
2
[2, 3, 4]
```

Enviroment:
- Python 3.7.4
- Numba 0.46.0
- ubuntu:latest on Docker
diff --git a/numba/tests/test_dispatcher.py b/numba/tests/test_dispatcher.py
index 849d04e33..8c2e8648e 100644
--- a/numba/tests/test_dispatcher.py
+++ b/numba/tests/test_dispatcher.py
@@ -15,7 +15,7 @@ from io import StringIO
 
 import numpy as np
 
-from numba import jit, generated_jit, typeof
+from numba import njit, jit, generated_jit, typeof
 from numba.core import types, errors, codegen
 from numba import _dispatcher
 from numba.core.compiler import compile_isolated
@@ -26,7 +26,8 @@ from numba.tests.support import (TestCase, temp_directory, import_dynamic,
 from numba.np.numpy_support import as_dtype
 from numba.core.caching import _UserWideCacheLocator
 from numba.core.dispatcher import Dispatcher
-from numba.tests.support import skip_parfors_unsupported, needs_lapack
+from numba.tests.support import (skip_parfors_unsupported, needs_lapack,
+                                 SerialMixin)
 
 import llvmlite.binding as ll
 import unittest
@@ -1965,5 +1966,46 @@ class TestNoRetryFailedSignature(unittest.TestCase):
         self.assertEqual(ct_bad, 1)
 
 
+class TestMultiprocessingDefaultParameters(SerialMixin, unittest.TestCase):
+    def run_fc_multiproc(self, fc):
+        try:
+            ctx = multiprocessing.get_context('spawn')
+        except AttributeError:
+            ctx = multiprocessing
+        with ctx.Pool(1) as p:
+            self.assertEqual(p.map(fc, [1, 2, 3]), list(map(fc, [1, 2, 3])))
+
+    def test_int_def_param(self):
+        """ Tests issue #4888"""
+
+        @njit
+        def add(x, y=1):
+            return x + y
+
+        self.run_fc_multiproc(add)
+
+    def test_none_def_param(self):
+        """ Tests None as a default parameter"""
+
+        @njit
+        def add(x, y=None):
+            return x + (1 if y else 2)
+
+        self.run_fc_multiproc(add)
+
+    def test_function_def_param(self):
+        """ Tests a function as a default parameter"""
+
+        @njit
+        def mult(x, y):
+            return x * y
+
+        @njit
+        def add(x, func=mult):
+            return x + func(x, x)
+
+        self.run_fc_multiproc(add)
+
+
 if __name__ == '__main__':
     unittest.main()

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc g++
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
exceptiongroup==1.2.2
importlib-metadata==6.7.0
iniconfig==2.0.0
llvmlite==0.33.0
-e git+https://github.com/numba/numba.git@9ce5c30d328a1ab2690fe4ea0880d32f1e9fa075#egg=numba
numpy==1.21.6
packaging==24.0
pluggy==1.2.0
pytest==7.4.4
tomli==2.0.1
typing_extensions==4.7.1
zipp==3.15.0

name: numba
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - argparse==1.4.0
      - exceptiongroup==1.2.2
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - llvmlite==0.33.0
      - numpy==1.21.6
      - packaging==24.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - zipp==3.15.0
prefix: /opt/conda/envs/numba

numba/tests/test_dispatcher.py::TestMultiprocessingDefaultParameters::test_function_def_param numba/tests/test_dispatcher.py::TestMultiprocessingDefaultParameters::test_int_def_param numba/tests/test_dispatcher.py::TestMultiprocessingDefaultParameters::test_none_def_param
numba/tests/test_dispatcher.py::TestDispatcher::test_ambiguous_new_version numba/tests/test_dispatcher.py::TestDispatcher::test_coerce_input_types numba/tests/test_dispatcher.py::TestDispatcher::test_disabled_compilation numba/tests/test_dispatcher.py::TestDispatcher::test_disabled_compilation_nested_call numba/tests/test_dispatcher.py::TestDispatcher::test_disabled_compilation_through_list numba/tests/test_dispatcher.py::TestDispatcher::test_dispatch_recompiles_for_scalars numba/tests/test_dispatcher.py::TestDispatcher::test_dispatcher_raises_for_invalid_decoration numba/tests/test_dispatcher.py::TestDispatcher::test_dyn_pyfunc numba/tests/test_dispatcher.py::TestDispatcher::test_equality numba/tests/test_dispatcher.py::TestDispatcher::test_explicit_signatures numba/tests/test_dispatcher.py::TestDispatcher::test_fingerprint_failure numba/tests/test_dispatcher.py::TestDispatcher::test_immutability_in_array_dispatch numba/tests/test_dispatcher.py::TestDispatcher::test_lock numba/tests/test_dispatcher.py::TestDispatcher::test_matching_error_message numba/tests/test_dispatcher.py::TestDispatcher::test_no_argument numba/tests/test_dispatcher.py::TestDispatcher::test_serialization numba/tests/test_dispatcher.py::TestDispatcher::test_signature_mismatch numba/tests/test_dispatcher.py::TestSignatureHandling::test_default_args numba/tests/test_dispatcher.py::TestSignatureHandling::test_named_args numba/tests/test_dispatcher.py::TestSignatureHandling::test_star_args numba/tests/test_dispatcher.py::TestSignatureHandlingObjectMode::test_default_args numba/tests/test_dispatcher.py::TestSignatureHandlingObjectMode::test_named_args numba/tests/test_dispatcher.py::TestSignatureHandlingObjectMode::test_star_args numba/tests/test_dispatcher.py::TestGeneratedDispatcher::test_generated numba/tests/test_dispatcher.py::TestGeneratedDispatcher::test_generated_dtype numba/tests/test_dispatcher.py::TestGeneratedDispatcher::test_signature_errors numba/tests/test_dispatcher.py::TestDispatcherMethods::test_get_annotation_info numba/tests/test_dispatcher.py::TestDispatcherMethods::test_inspect_asm numba/tests/test_dispatcher.py::TestDispatcherMethods::test_inspect_cfg numba/tests/test_dispatcher.py::TestDispatcherMethods::test_inspect_cfg_with_python_wrapper numba/tests/test_dispatcher.py::TestDispatcherMethods::test_inspect_llvm numba/tests/test_dispatcher.py::TestDispatcherMethods::test_inspect_types numba/tests/test_dispatcher.py::TestDispatcherMethods::test_inspect_types_with_signature numba/tests/test_dispatcher.py::TestDispatcherMethods::test_issue_with_array_layout_conflict numba/tests/test_dispatcher.py::TestDispatcherMethods::test_recompile numba/tests/test_dispatcher.py::TestDispatcherMethods::test_recompile_signatures numba/tests/test_dispatcher.py::TestCache::test_big_array numba/tests/test_dispatcher.py::TestCache::test_cache_invalidate numba/tests/test_dispatcher.py::TestCache::test_cache_reuse numba/tests/test_dispatcher.py::TestCache::test_caching numba/tests/test_dispatcher.py::TestCache::test_caching_nrt_pruned numba/tests/test_dispatcher.py::TestCache::test_closure numba/tests/test_dispatcher.py::TestCache::test_ctypes numba/tests/test_dispatcher.py::TestCache::test_frozen numba/tests/test_dispatcher.py::TestCache::test_inner_then_outer numba/tests/test_dispatcher.py::TestCache::test_looplifted numba/tests/test_dispatcher.py::TestCache::test_no_caching numba/tests/test_dispatcher.py::TestCache::test_outer_then_inner numba/tests/test_dispatcher.py::TestCache::test_recompile numba/tests/test_dispatcher.py::TestCache::test_same_names numba/tests/test_dispatcher.py::TestSequentialParForsCache::test_caching numba/tests/test_dispatcher.py::TestCacheWithCpuSetting::test_user_set_cpu_features numba/tests/test_dispatcher.py::TestCacheWithCpuSetting::test_user_set_cpu_name numba/tests/test_dispatcher.py::TestMultiprocessCache::test_multiprocessing numba/tests/test_dispatcher.py::TestCacheFileCollision::test_file_location numba/tests/test_dispatcher.py::TestCacheFileCollision::test_no_collision numba/tests/test_dispatcher.py::TestCacheMultipleFilesWithSignature::test_caching_mutliple_files_with_signature numba/tests/test_dispatcher.py::TestDispatcherFunctionBoundaries::test_dispatcher_as_arg_usecase numba/tests/test_dispatcher.py::TestDispatcherFunctionBoundaries::test_dispatcher_can_return_to_python numba/tests/test_dispatcher.py::TestDispatcherFunctionBoundaries::test_dispatcher_in_sequence_arg numba/tests/test_dispatcher.py::TestDispatcherFunctionBoundaries::test_pass_dispatcher_as_arg numba/tests/test_dispatcher.py::TestBoxingDefaultError::test_box_runtime_error numba/tests/test_dispatcher.py::TestBoxingDefaultError::test_unbox_runtime_error numba/tests/test_dispatcher.py::TestNoRetryFailedSignature::test_direct_call numba/tests/test_dispatcher.py::TestNoRetryFailedSignature::test_error_count numba/tests/test_dispatcher.py::TestNoRetryFailedSignature::test_nested_call
numba/core/serialize.py
numba/core/serialize.py